double atof(const char *nptr);
The atof() function converts a string pointed to by
nptr to a double-precision number.
This function recognizes (in order) an optional string of
spaces, an optional sign, a string of digits optionally
containing a radix character, an optional 'e' or 'E',
and then an optionally signed integer.
The first unrecognized character ends the string.
The radix character for atof()
is that defined by the last successful call to
setlocale(), category LC_NUMERIC.
If setlocale(), category LC_NUMERIC, has not
been called successfully, or if the radix is not defined for a supported
language, the radix character is defined as a period (.).
The call atof(nptr) is equivalent to:
Pointer to a character
The atof() functions returns the converted number.
If the correct value overflows, ±Infis returned (according
to the sign of the value).
If the correct value would cause an underflow, zero is returned.
MT-Safe, with exceptions.
This function is MT-Safe as long as no thread calls setlocale() while
this function is executing.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
- atoi(), atol(), setlocale(), strtod()
PTC MKS Toolkit 10.3 Documentation Build 39.