SHIP:Sail:atof

From Serious Documentation
Jump to: navigation, search
Function Returns Introduced Description
atof Float v5.0.120 Parses a String to get an Float from it

See Also:

Prototype

Float atof(String string);

Parameters/Return Value

Parameter Data Type Description
string String The string to parse
Return Float the floating point parsed value of the String

Detailed Description

The atof(string) function returns the Float parsed value of a String which should contain the string version of an Float or Integer.

Examples

Example Result Notes
atof("-5"); -5.0
atof("+5"); +5.0
atof("5.76"); +5.76
atof("57.89E+3"); +5.789E+4
atof("0.005789E3"); +5.789
atof("57.8X9E+3"); 57.8 Parsing stops at the X