Guardian Native C Library Calls Reference Manual (G06.25+, H06.03+)
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 first 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 first 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 first 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
final 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 str 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.
This function is not available on G-series systems.
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 or greater than 36.
If nptr is NULL, the functions return 0 and do not set errno.
[ERANGE] The converted value is outside the range of representable values.
RELATED INFORMATION
Functions: strtol(3), strtoul(3).
STANDARDS CONFORMANCE
This function is an extension to the Single UNIX Specification, Version 2 and the 1999 ANSI C
standard.
527192-003 Hewlett-Packard Company 6−99