lang • cfloat

CFloat

Float = CFloat ( Expression AS Variant ) AS Float Float = CFlt ( Expression AS Variant ) AS Float

Converts an expression into a floating point number.

Be careful! The current localization is not used by this function. That means: If the expression is a string, the decimal separator in the expression MUST be ".", even if in the localization it is defined as "," like in German, French...

Errors

Message

Description
Type mismatch (6) Expression cannot be converted.

Examples

Print CFloat("+3.1416")
3.1416
Print CFloat("1.0E+3")
1000

See also