Difference between revisions of "SHIP:Sail:atof"

From Serious Documentation
Jump to: navigation, search
Line 7: Line 7:
 
*[[SHIP:Sail:Functions|Sail Functions]]
 
*[[SHIP:Sail:Functions|Sail Functions]]
 
*[[SHIP:Sail:Numeric Functions|Sail Numeric Functions]]
 
*[[SHIP:Sail:Numeric Functions|Sail Numeric Functions]]
 +
*[[SHIP:Sail:String_Functions|Sail String Functions]]
 +
 
*{{SailFunc|atoi}}, {{SailFunc|ftoi}}, {{SailFunc|itof}}
 
*{{SailFunc|atoi}}, {{SailFunc|ftoi}}, {{SailFunc|itof}}
 
== Prototype ==
 
== Prototype ==
Line 46: Line 48:
  
 
[[Categories: Numeric Functions]]
 
[[Categories: Numeric Functions]]
 +
[[Categories:String Functions]]

Revision as of 15:36, 4 October 2016

Function Returns Introduced Description
atof Float 5.0.120 Parses a String to get an Float from it Badge SHIPv5.gif

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

Categories: Numeric Functions Categories:String Functions