strtod — User Commands
NAME
strtod − Convert character string to floating-point number
SYNOPSIS
#include <stdlib.h>
double
strtod(string, endPtr)
ARGUMENTS
char ∗string (in) String containing ASCII representation of floating-point number.
char ∗∗endPtr (out) If not NULL, gives address of pointer to fill in with address of first character not forming part of number.
DESCRIPTION
The strtod procedure parses a floating-point number in ASCII representation and returns a double result containing the binary form of the number. The expected form of string is an optional plus or minus sign, then a sequence of decimal digits optionally containing a decimal point, then an optional exponent part. If the exponent part is present, it consists of the letter E (or e), then an optional plus or minus sign, then a sequence of decimal digits. The entire floating-point number may be preceded by any amount of white space (as defined by the isspace procedure).
Strtod examines as many characters as possible from string while still obeying the syntax rules given above. If endPtr is not NULL, then the address of the first character following the floating-point number is stored in ∗endPtr.
If string does not refer to a floating-point number in the format given above, then zero is returned and string will be stored at ∗endPtr.
KEYWORDS
convert, floating-point, string
Sprite version 1.0 — March 21, 1989