Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

Guardian Native C Library Calls (s) strtoull(3)
If the value of base is 16, the characters 0x or 0X precede the sequence of letters and
digits, following the sign if present.
The subject sequence is the longest initial subsequence of the input string, starting with
the rst non-white-space character, that is of the expected form. The subject sequence
contains no characters if the input string is empty or consists entirely of white-space
characters, or if the rst non-white-space character is other than a sign or a permitted
letter or digit.
If the subject sequence has the expected form and the value of base is 0 (zero), the sequence of
characters starting with the rst digit is interpreted as an integer constant.
If the subject sequence has the expected form and the value of base is between 2 and 36, it is
used as the base for conversion, giving each letter its value as above. If the subject sequence
begins with a minus sign, the value resulting from the conversion is negated. A pointer to the
nal string is stored in the object pointed to by endptr, provided that endptr is not a null pointer.
If the subject sequence is empty or does not have the expected form, no conversion occurs; the
value of nptr is stored in the object pointed to by endptr, provided that endptr is not a null
pointer.
NOTES
The strtoull() function does not change the setting of errno if successful.
RETURN VALUES
The strtoull() function returns the converted value of 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, ULLONG_MAX is returned.
Because this function returns 0 (zero) and ULLONG_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
If any of the following conditions occurs, the strtoull() function sets errno to the corresponding
value:
[EINVAL] The base parameter has a value less than 0 (zero), equal to 1, or greater than 36.
[ERANGE] The converted value is outside the range of representable values.
If nptr is NULL, the function returns 0 (zero) and does not set errno.
RELATED INFORMATION
Functions: strtol(3), strtoul(3).
STANDARDS CONFORMANCE
The behavior of this function conforms to the Single UNIX Specication, Version 3 and the 1999
ANSI C standard.
527192-007 Hewlett-Packard Company 697