aattooff() -- General Function (libc)

Convert ASCII strings to floating point
#iinncclluuddee <ssttddlliibb.hh>
ddoouubbllee aattooff(_s_t_r_i_n_g) cchhaarr * _s_t_r_i_n_g;

aattooff converts  _s_t_r_i_n_g into the binary  representation of a double-precision
floating  point  number.  _s_t_r_i_n_g  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 letter `ee' or `EE'  followed by an optional
leading sign and any number of decimal digits.  For example,

    123e-2

is a string that can be converted by aattooff().

aattooff()  ignores  leading  blanks  and  tabs;  it  stops  scanning  when  it
encounters any unrecognized character.

_E_x_a_m_p_l_e
For an example of this function, see the entry for aaccooss().

_S_e_e _A_l_s_o
aattooii(), aattooll(), ffllooaatt, lliibbcc, lloonngg, pprriinnttff(), ssccaannff(), ssttddlliibb.hh
ANSI Standard, section 7.10.1.1
POSIX Standard, section 8.1

_N_o_t_e_s
aattooff does not  check to see if the value  represented by _s_t_r_i_n_g fits into a
ddoouubbllee.  It returns zero if you hand it a string that it cannot interpret.
