Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
Guardian Native C Library Calls (t - z) wcstoul(3)
RETURN VALUES
The wcstoul() function returns the converted value of the unsigned long integer if the expected
form is found. If no conversion could be performed, a value of 0 (zero) is returned. If the con-
verted value is outside the range of representable values,
ULONG_MAX is returned.
If the endptr parameter is not a null pointer, wcstoul() stores a pointer to the final sequence of
unrecognized characters in *endptr, except when the subject sequence is empty or invalid. In this
case, wcstoul() stores the nptr pointer in the *endptr parameter.
Since 0 (zero) and ULONG_MAX are returned in the event of an error and are also valid returns
if the wcstoul() function is successful, applications should set errno to 0 (zero) before calling
the wcstoul() function, and check errno after return from the wcstoul() function. If errno is
nonzero, an error occurred. Additionally, if 0 (zero) is returned, applications should check
whether the endptr parameter equals the nptr parameter. In this case, there was no valid subject
string.
ERRORS
If any of the following conditions occur, the wcstoul() function sets errno to the value that
corresponds to the condition.
EINVAL The base parameter has a value less than 0 or greater than 36, or the nptr param-
eter is a null pointer.
ERANGE The converted value is outside the range of representable values.
RELATED INFORMATION
Functions: atoi(3), iswalnum(3), scanf(3), strtoul(3), wcstod(3), wcstol(3), wctype(3).
527192-005 Hewlett-Packard Company 7−81