Everything

strtod


Conversion of character string to flonptrating-point number (double type) and storing pointer to last character string

[Classification]

Standard library

[Syntax]

#include <stdlib.h>

double __far strtod(const char __near *nptr, char __near * __near *endptr); (C90)

double __far strtod(const char __near * restrict nptr, char __near * __near * restrict endptr); (C99) [V1.07 or later]

double __far _COM_strtod_ff(const char __far *nptr, char __far * __far *endptr); (C90)

double __far _COM_strtod_ff(const char __far * restrict nptr, char __far * __far * restrict endptr); (C99) [V1.07 or later]

[Return value]

If the partial character string has been converted, the resultant value is returned. If the character string could not be converted, 0 is returned.

If an overflow occurs , strtod returns ±∞ and sets macro ERANGE to global variable errno.

If an underflow occurs, strtod returns 0 and sets macro ERANGE to global variable errno.

[Description]

This function skips 0 or more columns of white-space characters (character which makes the isspace function true) from the start of the string indicated by nptr, and converts the string from the next character into a double-type representation. When endptr is not the null pointer, the pointer to the remaining strings that were not converted is set to endptr.

[Restrictions]

Hexadecimal floating-point numbers are not supported in a recognizable format of a string that is subject to the conversion method specified in the C99 standard.