1ATOF(3) Library Functions Manual ATOF(3)
2
3
4
6 atof, atoi, atol - convert ASCII to numbers
7
9 double atof(nptr)
10 char *nptr;
11
12 atoi(nptr)
13 char *nptr;
14
15 long atol(nptr)
16 char *nptr;
17
19 These functions convert a string pointed to by nptr to floating, inte‐
20 ger, and long integer representation respectively. The first unrecog‐
21 nized character ends the string.
22
23 Atof recognizes an optional string of spaces, then an optional sign,
24 then a string of digits optionally containing a decimal point, then an
25 optional `e' or `E' followed by an optionally signed integer.
26
27 Atoi and atol recognize an optional string of spaces, then an optional
28 sign, then a string of digits.
29
31 scanf(3S)
32
34 There are no provisions for overflow.
35
36
37
387th Edition May 15, 1985 ATOF(3)