Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!att!cbnewsc!nevin1 From: nevin1@cbnewsc.ATT.COM (nevin.j.liber) Newsgroups: comp.lang.c Subject: Re: common bugs in C programs Message-ID: <12428@cbnewsc.ATT.COM> Date: 26 Dec 89 22:01:38 GMT References: <7140.25959377@urchin.fidonet.org> Reply-To: nevin1@ihlpb.ATT.COM (nevin.j.liber,708 979 4751) Organization: AT&T Bell Laboratories Lines: 13 In article <7140.25959377@urchin.fidonet.org> Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) writes: > >If you make it a matter of style to write conditionals as (const == var) >rather than (var == const), your compiler will flag the error for you and make >your code *much* easier to debug. Also, just by using (var == const) instead of (const == var), you tend not to make the mistake at all. -- _ __ NEVIN ":-)" LIBER nevin1@ihlpb.ATT.COM (708) 979-4751 IH 4J-323 ' ) ) "We are almost into the '90s; *nothing* is weird." / / _ , __o ____ -- Buzz Kelman, Newsman & Bluesman, WLUP, 7/28/89 / (_