Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!netcom!avery From: avery@netcom.UUCP (Avery Colter) Newsgroups: comp.lang.c Subject: What's so bad about scanf anyway??? Message-ID: <16582@netcom.UUCP> Date: 10 Nov 90 22:25:41 GMT Organization: Netcom- The Bay Area's Public Access Unix System {408 241-9760 guest} Lines: 17 In the self-teaching course I have here, scanf is the most often used input function. I don't see gets used much at all. And indeed, gets only seems of much advantage when you want to take in a whole line into one string. Otherwise, scanf can take individual numbers and put them directly into numerical variables. With gets, you'd have to first manually parse the line, and then use strtol to translate them into numbers. I didn't see puts used for printing strings to screen much either. printf was the function of choice. -- Avery Ray Colter {apple|claris}!netcom!avery {decwrl|mips|sgi}!btr!elfcat (415) 839-4567 "Fat and steel: two mortal enemies locked in deadly combat." - "The Bending of the Bars", A. R. Colter