ugliness in scanf(3)
geoff
geoff at burl.UUCP
Tue May 14 00:25:11 AEST 1985
> >the programmer would not be so stupid as to keep trying to
> >scan a chunk of input over & over with the same failing format.
>
> *mild flame*
>
> This programmer is so stupid as to expect to find the behavior
> of scanf documented in the manual.
>
> *unflame*
>
> --
> carl lowenstein marine physical lab u.c. san diego
> {ihnp4|decvax|akgua|dcdwest|ucbvax} !sdcsvax!mplvax!cdl
how about the bottom of page 2 of scanf documentation (V5.2)--
"Scanf conversion terminates at EOF, at the end of the control string, or
when an input character conflicts with the control string. In the latter
case, the offending character is left unread in the input stream."
I can only surmise that you have a different version of the manual --
it does seem quite clear.
geoff sherwood
More information about the Comp.lang.c
mailing list