|
||
double strtod( char *s, char **p )
char *s; /* input string */ char **p; /* address of char pointer to receive last parse position */
|
|
|
Synopsis |
#include "stdlib.h"
The strtod function attempts to convert the prefix of the string s into a floating point value of type double, and returns that value. If p is not NULL , then a pointer to the location in s where the conversion left off is stored into the character pointer at p . Leading spaces in s are skipped. The number must consist of an optional '+' or '-' , a sequence of decimal digits possibly containing a single decimal point, an optional exponent exponent part, consisting of the letter 'e' or 'E' , an optional sign, and a sequence of decimal digits.
|
|
Parameters |
s is a null-terminated string. *p is the address of a character pointer that is to receive the ending position of the parse.
|
|
Return Value |
strtod returns the floating point number. If the number would overflow, a range error is generated.
|
|
See Also |
|
|
|
|