Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!ut-emx!nather From: nather@ut-emx.UUCP (Ed Nather) Newsgroups: comp.lang.c Subject: Re: In defense of scanf() (Re: Re^2: scanf(..)) Message-ID: <16554@ut-emx.UUCP> Date: 4 Aug 89 15:40:27 GMT References: <225800176@uxe.cso.uiuc.edu> <11831@bloom-beacon.MIT.EDU> <1122@midgard.Midgard.MN.ORG> Organization: The University of Texas at Austin, Austin, Texas Lines: 17 In article <1122@midgard.Midgard.MN.ORG>, dal@midgard.Midgard.MN.ORG (Dale Schumacher) writes: > The operation of strtok() described above is NOT broken, it's documented. > It is also somewhat less useful than it could be due to its "interesting" > quirks, but it IS defined as working that way. Gosh, that makes programming really easy! Just throw something together, document all the bugs, and you're done! In my view, the operation of strtok() --- and, to a considerable extent, the operation of scanf() --- are both broken, documentation notwithstanding. I have totally avoided scanf() for 8 years, and will continue to do so. I wrote my own small versions of strtok() after reading its description, so I have never used the "official" one. -- Ed Nather Astronomy Dept, U of Texas @ Austin