A pointer to a read-only wide-character string, where each character is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets, such as Unicode. The string is null-terminated, with the terminator being a `wchar_t` with value 0.
1st Parameter
Pointer to the null-terminated wide-character string to be converted.
Pointer to a pointer to a wide character. It is set to the character in `nptr` where the conversion stopped.
Read more about parameters of wcstod64 in parameters section
The wcstod64function in C language Converts the initial portion of a wide character string to a decimal floating-point number with 64-bit precision.
wcstod64 converts the initial portion of the wide-character string pointed to by nptr to a _Decimal64 representation. It follows similar rules to wcstod but produces a decimal floating-point result with 64-bit precision.
The wcstod64function takes 2
parameters:
•
const wchar_t * `nptr`: Pointer to the null-terminated wide-character string to be converted.
•
wchar_t ** `endptr`: Pointer to a pointer to a wide character. It is set to the character in `nptr` where the conversion stopped.
Converts the initial part of the wide-character string `nptr` to a `_Decimal64` value. If `endptr` is not `NULL`, it points to the first character after the number that was converted.
The wcstod64 function return value :
Returns the converted _Decimal64 value
If no conversion could be performed, 0
0 is returned
If the correct value is outside the range of representable values, ±HUGE_VAL_D64 is returned (according to the sign of the value), and the value of the macro ERANGE is stored in errno
Output
This example demonstrates the basic usage of wcstod64 to convert a wide string to a _Decimal64 value, showing its higher precision compared to wcstod32.