A question about scanf

frank at pokey.UUCP frank at pokey.UUCP
Tue Nov 13 06:43:51 AEST 1984


> ***
> 
> 	Good advice about scanf is not to use it.   On Wollongong
> V7 it exhibits bizarre behavior, and it does not work at all on
> several ports I have used.  Now there are more differences! Bah!
> 
> -- 
> scc!steiny
> Don Steiny - Personetics @ (408) 425-0382
> 109 Torrey Pine Terr.
> Santa Cruz, Calif. 95060
> ihnp4!pesnta  -\
> fortune!idsvax -> scc!steiny
> ucbvax!twg    -/

Hear hear!  A favorite trick of library writers seems to be interpreting
the return variable as representing the number of items recognized, 
including each literal character scanned (as opposed to just the desired
variables).  This leads to outrageous return counts.

Others can't seem to get straight the syntax for recognizing shorts.
Are they h, or hd, or h with modifiers?  Who knows?  So much for 
portability.



More information about the Comp.lang.c mailing list