Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site pokey.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!uwvax!gumby!pokey!frank From: frank@pokey.UUCP Newsgroups: net.lang.c Subject: Re: A question about scanf Message-ID: <203@pokey.UUCP> Date: Mon, 12-Nov-84 15:43:51 EST Article-I.D.: pokey.203 Posted: Mon Nov 12 15:43:51 1984 Date-Received: Wed, 14-Nov-84 02:39:25 EST References: <202@spp2.UUCP> <219@scc.UUCP> Distribution: net Organization: U of Wisconsin CS Dept Lines: 23 > *** > > 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.