|
||
long atol( char *s )
char *s; /* string to be converted */
|
|
|
Synopsis |
#include "stdlib.h"
The atol function returns the value of an ASCII text string representation of a long integer. atol stops reading the input string at the first character that it cannot recognize as part of a number
|
|
Parameters |
s should be a null-terminated string with the following format:
[whitespace][sign][digits]
where [whitespace] is a sequence of tab or space characters, [sign] is either plus ('+') or minus ('-'), and [digits] are one or more decimal digits.
|
|
Return Value |
If s is empty, or no digits are found, then atol returns 0L. If the result overflows, then the return value is undefined.
|
|
See Also |
|
|
|
|