Home > lang > csng 
 fr de es it nl pl pt pt_BR mk sq ca ar fa vi ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration  
Documentation
History
 
CSng
Syntax
Result = CSng ( Expression AS Variant ) AS Single
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

MessageDescription
Type mismatch (#6) Expression cannot be converted.

Examples

PRINT CSng("+3.1416")

3.1416
PRINT CSng("1.0E+3")

1000
PRINT CSng(Pi);; CFloat(Pi)

3.141592741013 3.14159265359
PRINT CSng(1E50)

Overflow

See also

Conversion Functions