X3J11 Pleasanton meeting summary
Chris Torek
chris at mimsy.umd.edu
Mon Oct 8 17:40:50 AEST 1990
In article <13996 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn)
posts a number of interpretations, including:
> For scanf("%5e",&f) with next available input sequence "1.2e+4xy",
> all relevant scan termination checks are to be applied for each
> successive character before inputting another character; thus a
> "matching failure" finally occurs after 5 characters are
> successfully examined for strtod() subject string expected-form
> acceptability, and the next unread character will be '4' ("e+" is
> NOT pushed back onto the input).
A `matching failure'? In other words, such a scanf() call would return 0,
not 1? `e+' is lost? Pity, after all that work I went through to make it
right. :-)
Seriously, I think it is much better for the library to scan the number
as `1.2' and leave the `e+4xy' unread. This turns out not to be too
difficult.
(I would have to check my copy of the last draft to verify the words I
use above, but I am here and it is not....)
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 405 2750)
Domain: chris at cs.umd.edu Path: uunet!mimsy!chris
More information about the Comp.std.c
mailing list