ATOF - convert ASCII string to floating point.

(ANSI Standard)

Usage:

#include <stdlib.h>
x = atof(s);

Where:

const char *s;
points to a string of ASCII characters which correspond to a valid floating point number, e.g. "1.23".
double x;
is the floating point value corresponding to the given ASCII string.

Description:

"atof" converts the string pointed to by "s" into a floating point number. The string may consist of any number of blanks and/or tabs, possibly followed by a sign, followed by a string of digits that may contain a decimal point, then an 'e' or 'E' possibly followed by a sign, followed by an integer. Conversion stops with the first character that cannot belong to such a floating point number.

See Also:

expl c lib strtod

expl c lib scanf

Copyright © 1996, Thinkage Ltd.