HP 3000 Manuals

atof [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

atof 

Converts a string to a double floating-point number.

Syntax 

     #include <stdlib.h>
     double atof (const char *str);

Parameters 

str           A pointer to a character string to be converted to a double
              floating-point number.

Return Values 

x             A double floating-point number.

Description 

The atof function converts the string of characters that the str argument
points to into a double floating-point number.  The atof function skips
over white space before looking for the start of the number.  The format
of the input string is the same as that accepted by the %lf scanf format
conversion.

This function converts any numeric and numeric formatting characters up
to, but not after, any non-numeric character that it encounters.  In this
case, atof() returns the number that has been converted up to that point.

See Also 

atoi(), atol(), strtod(), strtol(), strtoul(), ANSI C 4.10.1.1, POSIX.1
8.1



MPE/iX 5.0 Documentation