ATOF(3) BSD Programmer's Manual ATOF(3) NNAAMMEE aattooff - convert ASCII string to double SSYYNNOOPPSSIISS ##iinncclluuddee <<ssttddlliibb..hh>> _d_o_u_b_l_e aattooff(_c_o_n_s_t _c_h_a_r _*_n_p_t_r); DDEESSCCRRIIPPTTIIOONN The aattooff() function converts the initial portion of the string pointed to by _n_p_t_r to _d_o_u_b_l_e representation. It is equivalent to: strtod(nptr, (char **)NULL); SSEEEE AALLSSOO atoi(3), atol(3), strtod(3), strtol(3), strtoul(3) SSTTAANNDDAARRDDSS The aattooff() function conforms to ANSI C X3.159-1989 (``ANSI C ''). BBUUGGSS This manual page represents intent instead of actual practice. While it is intended that aattooff() be implemented using strtod(3), this has not yet happened. In the current system, aattooff() translates a string in the fol- lowing form to a double: a string of leading white space, possibly fol- lowed by a sign (``+'' or ``-''), followed by a digit string which may contain one decimal point (``.''), which may be followed by either of the exponent flags (``E'' or ``e''), and lastly, followed by a signed or un- signed integer. 4.4BSD June 4, 1993 1