|
|
coherent
atof() General Function atof()
Convert ASCII strings to floating point
ddoouubbllee aattooff(_s_t_r_i_n_g) cchhaarr * _s_t_r_i_n_g;
atof converts string into the binary representation of a double-
precision floating point number. string must be the ASCII
representation of a floating-point number. It can contain a
leading sign, any number of decimal digits, and a decimal point.
It can be terminated with an exponent, which consists of the let-
ter `e' or `E' followed by an optional leading sign and any num-
ber of decimal digits. For example,
123e-2
is a string that can be converted by atof.
atof ignores leading blanks and tabs; it stops scanning when it
encounters any unrecognized character.
***** Example *****
For an example of this function, see the entry for acos.
***** See Also *****
atoi(), atol(), float, general functions, long, printf(), scanf()
***** Notes *****
atof does not check to see if the value represented by string
fits into a ddoouubbllee. It returns zero if you hand it a string that
it cannot interpret.
COHERENT Lexicon Page 1
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.