toDecimal

toDecimal

Overview

The toDecimal function takes an expression as an argument, and returns a decimal value.;

Return Type

  • DECIMAL

Syntax

<variable>=<expression>.toDecimal();

(OR)

<variable>=toDecimal(<expression>);

where,

ParameterData typeDescription
<variable>DECIMALVariable which will contain the converted decimal value.
<expression>DECIMAL/NUMBER/TEXT

The expression which will be returned in decimal format.

Empty texts will throw an error during runtime.

Text should contain only numerical values.

Examples

 marks=99.9;
 marks_text="100";

 info toDecimal(marks);// Returns 99.9
 infotoDecimal(marks_text);// Returns 100

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com