Difference between revisions of "SHIP:Sail:atof"

From Serious Documentation
Jump to: navigation, search
(Created page with "__NOTOC__ {{SailFuncTableStart|}}<onlyinclude> |{{SailFunc|atof}}||{{DataType|Integer}}||style="text-align:center;"|v5.0.120||Parses a string to get an integer from it</onlyin...")
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
{{SailFuncTableStart|}}<onlyinclude>
 
{{SailFuncTableStart|}}<onlyinclude>
|{{SailFunc|atof}}||{{DataType|Integer}}||style="text-align:center;"|v5.0.120||Parses a string to get an integer from it</onlyinclude>
+
|{{SailFunc|atof}}||{{DataType|Integer}}||style="text-align:center;"|v5.0.120||Parses a string to get an {{DataType|Float}} from it</onlyinclude>
 
|}
 
|}
 
== See Also: ==
 
== See Also: ==

Revision as of 15:40, 29 July 2014

Function Returns Introduced Description
atof Integer v5.0.120 Parses a string to get an Float from it

See Also:

Prototype

Integer 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