lang • csng

CSingle

Result = CSingle ( Expression AS Variant ) AS Single

Converts an expression into a Single floating point number.

Be careful! The current localization is not used by this function.

Errors

Message

Description
Type mismatch (6) Expression cannot be converted.

Examples

Print CSingle("+3.1416")
3.1416
Print CSingle("1.0E+3")
1000
Print CSingle(Pi);; CFloat(Pi)
3.141592741013 3.14159265359
Print CSingle(1E50)
Overflow

See also