Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!spool.mu.edu!cs.umn.edu!talon.UCS.ORST.EDU!usenet!ogicse!intelhf!ichips!iwarp.intel.com!gargoyle!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.lang.c Subject: Re: One more point regarding = and == (more flamage) Message-ID: <1991Mar26.184245.3538@chinet.chi.il.us> Date: 26 Mar 91 18:42:45 GMT References: <925@isgtec.UUCP> Organization: Chinet - Chicago Public Access UNIX Lines: 16 In article <925@isgtec.UUCP> robert@isgtec.UUCP writes: >|> a) while (*foo++ = *bar++) >|> b) while (*foo ++ == *bar++) >|> c) while ((*foo++ = *bar++) != 0) >Well the biggest argument has been if you use a) the maintainer can't tell >if you meant a) or b); if you use c) the maintainer KNOWS you meant a). >This isn't rubbish. If you assume that the programmer didn't make a mistake (i.e. typed what he was thinking), then a) is just as obvious as c). If you assume that he did make a mistake, then c) is probably more likely to be wrong that a). More characters = more chances to screw up. Les Mikesell les@chinet.chi.il.us