wcstod(3C)wcstod(3C)NAMEwcstod(), wcstof(), wcstold() - convert a wide character string to a
double-precision number
SYNOPSISItanium(R)-based Systems Only
Remarks
These functions are compliant with the UNIX standard Worldwide Porta‐
bility Interface wide-character formatting functions. They parallel
the 8-bit character formatting functions defined in strtod(3C), str‐
told(3C) and strtof(3C) respectively.
DESCRIPTION
The and functions return the value represented by the wide-character
string pointed to by nptr as a double-precision floating-point number,
single-precision floating-point number, and long double-precision num‐
ber, respectively. The wide character string is scanned (leading
white-space characters as defined by in wctype(3C) are ignored) up to
the first unrecognized character. If no conversion can take place,
zero is returned.
The and functions recognize wide characters in the following sequence:
1. An optional string of white space wide characters, which
are ignored
2. An optional sign followed by one of the following:
· A string of digits optionally containing a radix
character, then an optional or followed by an
optional sign or space, followed by an integer
· A 0x or 0X, then a non-empty sequence of hexadec‐
imal digits optionally containing a radix charac‐
ter, then an optional binary exponent part
· One of INF or INFINITY, or any other wide string
equivalent except for case
· One of NAN or NAN(n-wchar-sequence), or any other
wide string ignoring case in the NAN part, where n-
wchar-sequence is:
· digit
· nondigit
· n-wchar-sequence digit
· n-wchar-sequence nondigit
The radix character is determined by the current environment (see set‐
locale(3C)). If has not been called successfully, the default environ‐
ment, "C", is used (see lang(5)). The default environment specifies a
period (.) as the radix character.
If the value of endptr is not the variable to which it points is set to
point at the wide character after the last number, if any, that was
recognized. If no number can be formed, is set to nptr, and zero is
returned.
EXTERNAL INFLUENCES
Environment Variables
determines the value of the radix character within the currently loaded
environment.
determines how wide character codes are interpreted.
International Code Set Support
Single- and multibyte character code sets are supported.
RETURN VALUE
If the correct value would cause overflow, or is returned (according to
the sign of the value), and is set to
If the correct value would cause underflow, zero is returned and is set
to
If encounters an input wide character string equal to or (both case
insensitive) it will return If encounters an input wide character
string equal to or (both case insensitive) it will return
AUTHOR
was developed by AT&T and HP. and were developed by HP.
SEE ALSOscanf(3S), setlocale(3C), wcstol(3C), wctype(3C), lang(5),
thread_safety(5), glossary(9).
STANDARDS CONFORMANCEwcstod(3C)