toDecimal
Table of Contents
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,
| Parameter | Data type | Description |
| <variable> | DECIMAL | Variable 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