(C) 1998 AROS - The Amiga Research OS


NAME
#include <stdlib.h>
#include <math.h>

double strtod ()

SYNOPSIS
const char * str
char ** endptr

FUNCTION
Convert a string of digits into a double.

INPUTS
str
The string which should be converted. Leading whitespace are ignored. The number may be prefixed by a '+' or '-'. An 'e' or 'E' introduces the exponent. Komma is only allowed before exponent.
endptr
If this is non-NULL, then the address of the first character after the number in the string is stored here.

RESULT
The value of the string. The first character after the number is returned in *endptr, if endptr is non-NULL. If no digits can be converted, *endptr contains str (if non-NULL) and 0 is returned.

EXAMPLE

SEE ALSO
atof(), atoi(), atol(), strtol(), strtoul()

NOTES

BUGS

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
26.08.1998 hkiel
fixed a typo
24.08.1998 bergers
Prev. bugfix only fixed have the problem. Oh well.
23.08.1998 bergers
Bugfix for numbers with a decimal point.
19.06.1998 nlorentz
Fixed errors + bug (Had forgot to increase `str` after checking for `E` in the number
14.06.1998 hkiel
Added support for negative exponents ;-)
13.06.1998 hkiel
Added two new files for string->float conversion