LOTUSSCRIPT LANGUAGE


CSng function
Example

Returns a value converted to the Single data type.

Syntax

CSng ( expr )

Elements

expr


Return value

CSng returns the numeric value of expr as a Single value.

CSng(EMPTY) returns 0.

If expr is a string expression, CSng returns the numeric representation of the string, including any fractional part. If LotusScript cannot convert the string to a number, the function raises an error.

If the value of expr is too large to fit in the Single data type, the function raises an error.

Language cross-reference

@TextToNumber function in formula language

Example
See Also