Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

OSS Library Calls (w - z) wcstod(3)
NAME
wcstod - Converts a wide-character string to a double-precision floating-point value
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <wchar.h>
double wcstod(
const wchar_t * ws,
wchar_t **endptr);
PARAMETERS
ws Points to the wide-character string that is to be converted to a double-precision,
floating-point value.
endptr Points to a pointer in which the wcstod( ) function stores the position in the
string specified by ws where an unrecognized character is found.
DESCRIPTION
The wcstod( ) function converts the initial portion of the wide-character string pointed to by the
ws parameter to a double-precision, floating-point value. The input wide-character string is first
broken down into three parts:
An initial (possibly empty) sequence of white-space, wide-character codes (as specified
by the iswspace( ) function).
A subject sequence interpreted as a floating-point constant.
A final wide-character string of one or more unrecognized wide-character codes, includ-
ing the terminating null wide character.
The subject sequence is then, if possible, converted to a floating-point number and returned as
the result of the wcstod( ) function.
The expected form and order of the subject sequence is an optional + (plus) or - (minus) sign,
followed by one of these:
A nonempty sequence of decimal digits optionally containing a radix (decimal-point)
character, then an optional exponent part, which consists of e or E, followed by an
optional + (plus sign) or - (minus sign), followed by one or more decimal digits.
For H06.08 and later H-series RVUs only, a 0x or 0X, then a nonempty sequence of hex-
adecimal digits optionally containing a radix (decimal-point) character, then an optional
binary exponent part, which consists of p or P, followed by an optional + (plus sign) or -
(minus sign), followed by one or more decimal digits.
For IEEE floating-point values and For H06.08 and later H-series RVUs only, one of
INF, INFINITY, NAN, or NAN(seq), where seq is a sequence of digit and nondigit char-
acters.
The subject sequence is the longest initial subsequence of the input wide-character string, start-
ing with the first non-white-space, wide-character code, that is of the expected form. The subject
sequence contains no wide-character codes if the input wide-character string is empty or consists
527187-017 Hewlett-Packard Company 825