C Run-Time Library Reference
atof
convert string to a double
Synopsis
#include <stdlib.h>
double atof(const char *nptr);
Description
The
function converts a character string into a floating-point value
atof
of type
double
the argument
nptr
characters (as determined by the function
floating-point number. The floating-point number may either be of the
form of a decimal floating-point number or a hexadecimal floating-point
number.
A decimal floating-point number has the form:
[sign] [digits] [.digits] [{e|E} [sign] [digits]]
The
token is optional and is either plus ( + ) or minus ( – ); and
sign
are one or more decimal digits. The sequence of digits may contain
digits
a decimal point ( . ).
The decimal digits can be followed by an exponent, which consists of an
introductory letter (
exponent part nor a decimal point appears, a decimal point is assumed to
follow the last digit in the string.
The form of a hexadecimal floating-point number is:
[sign] [{0x}|{0X}] [hexdigs] [.hexdigs] [{p|P} [sign] [digits]]
3-34
, and returns its value. The character string is pointed to by
and may contain any number of leading whitespace
or
) and an optionally signed integer. If neither an
e
E
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
) followed by a
isspace
for ADSP-219x DSPs
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers