strtof


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

[Classification]

Standard library

[Syntax]

#include <stdlib.h>

float __far strtof(const char __near *nptr, char __near * __near *endptr);

float __far _COM_strtof_ff(const char __far *nptr, char __far * __far *endptr);

[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, strtof returns and sets macro ERANGE to global variable errno.

If an underflow occurs, strtof 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 float-type representation. When endptr is not the null pointer, the pointer to the remaining strings that were not converted is set to endptr.