ugliness in scanf(3)

VLD/VMB gwyn at Brl.ARPA
Wed May 8 12:55:51 AEST 1985


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.



More information about the Comp.lang.c mailing list