/sys/doc/ Documentation archive

ATOF(III)                    4/30/73                    ATOF(III)

     atof - convert ASCII to floating

     double atof(nptr)
     char *nptr;

     Atof  converts  a  string to a floating number.  Nptr should
     point to a string containing the number; the first  unrecog-
     nized character ends the number.

     The  only  numbers  recognized  are:  an optional minus sign
     followed by a string of  digits  optionally  containing  one
     decimal point, then followed optionally by the letter e fol-
     lowed by a signed integer.

     There are none; overflow results in a very large number  and
     garbage characters terminate the scan.

     The  routine  should accept initial +, initial blanks, and E
     for e.  Overflow should be signalled.

                              - 1 -