Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ames!ucsd!ucsdhub!esosun!seismo!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.lang.c Subject: Re: Substitute for gets() Message-ID: <978@auspex.UUCP> Date: 9 Feb 89 11:30:28 GMT References: <721@hscfvax.harvard.edu> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 9 >I mean, gets() in such a loop does just fine, ie it would return "foo >bar", but I have yet to kludge up a functionally equivalent scanf(). > >Does this mean gets() is indispensable ? No, it means no such thing. Look under "f", as in "fgets()" in your reference manual. Yes, it leaves a '\n' at the end of the line, but it's not *that* big of a pain to remove it.