Path: utzoo!attcan!uunet!mcsun!ukc!edcastle!aipna!rjc From: rjc@uk.ac.ed.cstr (Richard Caley) Newsgroups: comp.lang.c Subject: Re: What's so bad about scanf anyway??? Message-ID: Date: 12 Nov 90 01:23:56 GMT References: <16582@netcom.UUCP> Sender: news@aipna.ed.ac.uk Organization: Center for Speech Technology Research Lines: 16 In-reply-to: roy%cybrspc@cs.umn.edu's message of 11 Nov 90 07:49:54 GMT In article roy%cybrspc@cs.umn.edu (Roy M. Silvernail) writes: The problem with scanf() is that it can behave unpredictably when you give it badly formatted input. It's better, IMHO, to gets() a whole line, check its validity and _then_ sscanf() it into the target variables. Maybe it was just a typo, but repeat after me `GETS is EVIL' This has been un unpayed anouncement by paranoids anonymous. -- rjc@uk.ac.ed.cstr _O_ |<