Another scanf interpretation question
Chris Torek
chris at mimsy.umd.edu
Fri Jan 5 06:12:41 AEST 1990
In article <21624 at mimsy.umd.edu> I wrote:
>... strtol and strtoul are defined such that they `accept' numbers
>[consisting of only a sign]
Oops: although they return zero, they do not consume the sign, so that
given `strtol("-", &endptr, 0)', *endptr will be '-'. In effect, they
do not accept numbers consisting of only a sign.
(In other words, the floating point question applies.)
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at cs.umd.edu Path: uunet!mimsy!chris
More information about the Comp.std.c
mailing list