Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pacbell!att!homxb!houxs!beyer From: beyer@houxs.ATT.COM (J.BEYER) Newsgroups: comp.arch Subject: Re: Fun C typos (was *p++ = *q++) Summary: I love typos in C, too... Message-ID: <1184@houxs.ATT.COM> Date: 9 Feb 89 22:32:49 GMT References: <777@atanasoff.cs.iastate.edu> <223@nbires.nbi.com> Distribution: usa Organization: AT&T BL Holmdel NJ USA Lines: 23 In article <223@nbires.nbi.com>, maa@nbires.nbi.com (Mark Armbrust) writes: > In article <777@atanasoff.cs.iastate.edu> hascall@atanasoff.cs.iastate.edu (John Hascall) writes: > > > > I guess it's just a knee-jerk reaction to "=" in a "while". > > > I just love typos in C. One time I ended up with something like: > > if (a |= b) ... One that took me a while to find was, roughly, for(i == 0; ... Now the funny thing was that i was seldom equal to zero on entry to this loop, so it started at FALSE or 0 almost always. But once in a while i did == 0, so the loop would start at TRUE sometimes. TRUE is not 0 in our implimentation. Very vexing to find. -- Jean-David Beyer A.T.&T., Holmdel, New Jersey, 07733 houxs!beyer