Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

wcstof(3) Guardian Native C Library Calls Reference Manual
When the value of the endptr parameter is not (char**) NULL, a pointer to the character that
terminated the scan is stored at *endptr.
When a floating-point value cannot be formed, *endptr is set to nptr.
The setlocale() function might affect the radix character used in the conversion result. The radix
character is controlled by the LC_NUMERIC category of the setlocale() function.
NOTES
In the TNS/E native environment, all locales are supported.
This function supports both IEEE Std 754-1985 floating-point and Tandem floating-point values
in the native environment. If the value is in IEEE floating-point format, the sign of 0.0 (zero) can
be either positive or negative.
Refer to the fp_class(3) reference page for a description of IEEE value classes.
Guardian functions are available to convert between floating-point formats. Refer to the Guar-
dian Programmers Guide for a discussion of floating-point conversions.
RETURN VALUES
When the string pointed to by nptr is empty or begins with an unrecognized character, 0.0 (zero)
is returned as the floating-point value.
When a correct return value would cause overflow, a properly signed HUGE_VAL (INF)is
returned. On underflow, a properly signed 0.0 (zero) is returned.
Upon successful completion, the wcstof() function returns the converted floating-point value.
Because a return value of 0.0 (zero) can represent either a valid conversion or an error, you
should use errno to check for possible errors. Set errno to a value of 0 before the call to the
wcstof( ) function and then check it for a nonzero value after the call. If errno is nonzero, an
error has occurred.
ERRORS
If any of the following conditions occurs, the wcstof() function sets errno to the corresponding
value:
[ERANGE] The input string is out of range (that is, the subject sequence cannot be converted
to a floating-point value without causing underflow or overflow).
RELATED INFORMATION
Functions: atof(3), atoi(3), fp_class(3), isnan(3), isspace(3), iswspace(3), scanf(3), setlocale(3).
STANDARDS CONFORMANCE
The behavior of this function conforms to the ISO/IEC 9899:1999 specification when used for
IEEE floating-point format data.
7158 Hewlett-Packard Company 527192-018