X3J11 Pleasanton meeting summary

Rick Schubert rns at se-sd.SanDiego.NCR.COM
Tue Oct 9 04:26:47 AEST 1990


In <26889 at mimsy.umd.edu> chris at mimsy.umd.edu (Chris Torek) writes:

>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",
[produces a "matching failure" and the next unread character will be '4']

>A `matching failure'?  In other words, such a scanf() call would return 0,
>not 1?  `e+' is lost?

>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.

Note that at this point, the role of X3J11 is to interpret what the Standard
says, not what would be nice.  We are not even allowed to say "but we had
meant to say ..." if the Standard is unambiguous.  If there is an
ambiguity, we can resolve it based on demonstrated intent.

I don't know if the given interpretation is consistent with our original
intent.  If it is, I suspect that we made that decision to simplify the
specification of `scanf'.

-- Rick Schubert (rns at se-sd.sandiego.NCR.COM)



More information about the Comp.std.c mailing list