Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: In defense of scanf() (Re: Re^2: scanf(..)) Message-ID: <4563@ficc.uu.net> Date: 15 Jun 89 13:48:09 GMT References: <225800176@uxe.cso.uiuc.edu> <11831@bloom-beacon.MIT.EDU> <3145@buengc.BU.EDU> Organization: Xenix Support Lines: 17 In article <3145@buengc.BU.EDU>, bph@buengc.BU.EDU (Blair P. Houghton) writes: > When filtering tabular data from files, or dealing in a situation where > a precise syntax is necessary, the `fgets(..); sscanf(..)' doublet just > adds uncertainty and complexity to a simple problem to which scanf is > suited ideally. Eeep and Yoicks yourself. I suspect this is another religious issue, but given scanf's habit of trashing indeterminate amounts of input and ignoring newlines if you have anything wrong with your format string, well... precision and scanf just don't belong in the same sentence. I tend to stick with strspn() and strtok(), myself. -- Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Business: uunet.uu.net!ficc!peter, peter@ficc.uu.net, +1 713 274 5180. Personal: ...!texbell!sugar!peter, peter@sugar.hackercorp.com.