ugliness in scanf(3)

Carl Lowenstein cdl at mplvax.UUCP
Fri May 10 06:00:27 AEST 1985


In article <10496 at brl-tgr.ARPA> gwyn at Brl.ARPA (VLD/VMB) writes:
>That's not a bug, it's a feature.  How else would you be able
>to determine what comes next when a scanf stops prematurely?
>If it ate the "failing" character, you could never see what it
>was.  I think the routine was designed on the assumption that
>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



More information about the Comp.lang.c mailing list