Plauger & Brodie strtod description
Richard A. O'Keefe
ok at quintus.UUCP
Wed Dec 27 11:35:24 AEST 1989
The railroad diagram on page 163 of "Standard C" by Plauger & Brodie
suggests that the string argument of strtod() must contain either a
decimal point or an exponent, so that strtod("1234", (char**)NULL)
must return 0.0 if called in the "C" locale. This requirement matches
the syntax of floating-point constants in C, but it is more restrictive
than current versions of strtod(), which accept "1234".
Q1: have Plauger & Brodie got it right?
Q2: if they have got it right, why does the standard prohibit "1234"
in *data*?
More information about the Comp.std.c
mailing list