Syntax | #include <wchar.h> double wcstod(const wchar_t *nptr, wchar_t **endptr); | |
Description | These functions convert the initial portion of the wide character string pointed to by nptr to a double-precision representation. The input wide character string is first decomposed into three parts:
The expected form of the subject sequence may be structured as follows:
If the subject sequence has the expected form, the sequence of wide character codes starting with the first digit or the radix (whichever occurs first) is interpreted as a floating constant as defined in the C language, except that the radix is used in place of a period, and that if neither an exponent part nor a radix appears, a radix is assumed to follow the last digit in the wide character string. If the subject sequence begins with a minus sign, the value resulting from the conversion is negated. A pointer to the final wide character string is stored in the object pointed to by endptr, provided that endptr is not a null pointer. The radix is defined in the program's locale (category In a locale other than the | |
Return val. | Converted value | |
if successful. | ||
0 | if no conversion could be performed. | |
| depending on the function type and the sign of the result, the correct value is outside the range of representable values. | |
Errors |
| |
| The value to be returned would cause overflow or underflow. | |
Notes | Since 0 is returned on error and is also a valid return value on success, an application wishing to check for error situations should perform the following actions: set Restriction | |
See also |
|