/ lang / csng
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

Message | Description
--- | ---
Type mismatch (#6) | Expression cannot be converted.

### Examples

    PRINT CSng("+3.1416")
    <hr>3.1416

    PRINT CSng("1.0E+3")
    <hr>1000

    PRINT CSng(Pi);; CFloat(Pi)
    <hr>3.141592741013 3.14159265359

    PRINT CSng(1E50)
    <hr>Overflow

### See also

Conversion Functions