ANSI draft interpretation questions

Steve Thomas sthomas at acorn.co.uk
Wed Jan 10 04:00:56 AEST 1990


In article <21675 at mimsy.umd.edu> chris at mimsy.umd.edu (Chris Torek) writes:
>Anyway, here are the (apparent) answers:
	[ list of answers ]

I've been following this discussion with some interest, since I'm
trying to implement scanf() myself.  This list of answers is in line
with my latest reading of the standard, though I confess that I went
astray a few times.  There is an example which is presumably supposed
to clarify matters (although it's not, of course, officially part of
the standard).  In the Dec. 88 draft, page 139 line 24 says

	count = 0; /* "100e" fails to match "%f" */

when trying to match "%f%20s of %20s" with the input `100ergs of
energy'.

The example is clearly wrong, since page 151 line 36ff speaks of the
`longest initial subsequence ... of the correct form'.  Caveat lector,
I suppose.

Steve Thomas



More information about the Comp.std.c mailing list