Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: Talking about scanf (was Re: What's so bad about scanf anyway???) Message-ID: <4355@goanna.cs.rmit.oz.au> Date: 23 Nov 90 05:56:37 GMT References: <16582@netcom.UUCP> <960@mwtech.UUCP> <17295@netcom.UUCP> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 14 In article <17295@netcom.UUCP>, avery@netcom.UUCP (Avery Colter) writes: > Another thing in scanf's favor over gets... > While reading the new and improved 10 commandments, I was reminded of > gets' nasty habit of taking any size line given to it. Why is this a point in favour of scanf()? scanf("%[^\n]%*c", buff) >= 0 and gets(buff) != NULL do pretty much the same thing; scanf() will "take any size line given to it". -- I am not now and never have been a member of Mensa. -- Ariadne.