Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uunet!pmafire!mica.inel.gov!gem-hy!cdm From: cdm@gem-hy.Inel.GOV (Dale Cook) Newsgroups: comp.lang.c Subject: Re: One more point regarding = and == (more flamage) Message-ID: <1991Mar28.223920.3261@inel.gov> Date: 28 Mar 91 22:39:20 GMT Article-I.D.: inel.1991Mar28.223920.3261 References: <925@isgtec.UUCP> <1991Mar26.184245.3538@chinet.chi.il.us> Sender: news@inel.gov Reply-To: cdm@gem-hy.Inel.GOV (Dale Cook) Organization: Idaho National Engineering Laboratory, Idaho Falls, Idaho Lines: 35 In article <1991Mar26.184245.3538@chinet.chi.il.us>, les@chinet.chi.il.us (Leslie Mikesell) writes: |> 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. ^ Don't you mean '==' ?? ---------------------------------------------------------------------- --- Dale Cook "You can sum this game up in one word - cdm@inel.gov 'you never know'". --- J. Andujar The opinions are mine. The following disclaimer is my employers. ---------------------------------------------------------------------- ========== long legal disclaimer follows, press n to skip =========== Neither the United States Government or the Idaho National Engineering Laboratory or any of their employees, makes any warranty, whatsoever, implied, or assumes any legal liability or responsibility regarding any information, disclosed, or represents that its use would not infringe privately owned rights. No specific reference constitutes or implies endorsement, recommendation, or favoring by the United States Government or the Idaho National Engineering Laboratory. The views and opinions expressed herein do not necessarily reflect those of the United States Government or the Idaho National Engineering Laboratory, and shall not be used for advertising or product endorsement purposes.