|
|
От: |
VVV
|
|
| Дата: | 06.04.04 15:24 | ||
| Оценка: | 1 (1) +1 | ||
long strtol( const char *nptr, char **endptr, int base );strtol expects nptr to point to a string of the following form:
[whitespace] [{+ | –}] [0 [{ x | X }]] [digits]
A whitespace may consist of space and tab characters, which are ignored; digits are one or more decimal digits. The first character that does not fit this form stops the scan. If base is between 2 and 36, then it is used as the base of the number. If base is 0, the initial characters of the string pointed to by nptr are used to determine the base. If the first character is 0 and the second character is not 'x' or 'X', the string is interpreted as an octal integer; otherwise, it is interpreted as a decimal number. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than base are permitted.