ATOF(S) XENIX System V ATOF(S)
Name
atof, atoi, atol - Converts ASCII to numbers.
Syntax
double atof (nptr)
char *nptr;
int atoi (nptr)
char *nptr;
long atol (nptr)
char *nptr;
Description
These functions convert a string pointed to by nptr to
floating, integer, and long integer numbers respectively.
The first unrecognized character ends the string.
atof recognizes a string of the form:
[ +| - ] digits[. digits ][ e| E [ +| - ] digits ]
where the digits are continguous decimal digits. Any number
of tabs and spaces may precede the string. The + and -
signs are optional. Either e or E may be used to mark the
beginning of the exponent.
atoi and atol recognize strings of the form:
[ +| - ] digits
where the digits are contiguous decimal digits. Any number
of tabs and spaces may precede the string. The + and -
signs are optional.
See Also
scanf(S)
Notes
There are no provisions for overflow.
These routines must be linked by using the -lm linker
option.
Page 1 (printed 8/7/87)