Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

atoll(3) OSS Library Calls Reference Manual
NAME
atoll - Converts a character string to a long long integer
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <stdlib.h>
long long int atoll (
const char *nptr );
PARAMETERS
nptr Points to the character string to convert.
DESCRIPTION
The atoll( ) function converts the character string pointed to by the nptr parameter up to the first
character inconsistent with the format of a decimal integer to a long long integer data type. Lead-
ing white-space characters are ignored. A call to this function is equivalent to a call to
strtoll(nptr, (char**) NULL, 10), except that error handling is different. The long long int
value of the input string is returned.
NOTES
The atoll( ) function is subsumed by the strtoll( ) function. If the number is not known to be in
range, strtoll( ) should be used because atoll( ) is not required to perform any error checking.
RETURN VALUES
The atoll( ) function returns the converted value of the long long integer if the expected form is
found. If no conversion could be performed, a value of 0 (zero) is returned. If the converted
value is outside the range of representable values, LLONG_MAX or LLONG_MIN is returned
(according to the sign of the value).
Because this function returns 0 (zero), LLONG_MIN,orLLONG_MAX in the event of an error
and these values are also valid returns if the function is successful, applications should set errno
to 0 (zero) before calling this function, and check errno after return from the function. If errno
is nonzero, an error occurred.
ERRORS
No error values are defined for return.
RELATED INFORMATION
Functions: atof(3), atoi(3), atol(3), scanf(3), strtol(3), strtoll(3), strtoul(3), strtoull(3),
scanf(3), wcstol(3).
154 Hewlett-Packard Company 527187-017