Path: utzoo!attcan!uunet!cs.utexas.edu!yale!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: Assignment in test: OK? Message-ID: <28314:Sep1221:17:1990@kramden.acf.nyu.edu> Date: 12 Sep 90 21:17:19 GMT References: <1990Sep11.003102.9271@virtech.uucp> <1599@mitisft.Convergent.COM> Organization: IR Lines: 9 In article <1599@mitisft.Convergent.COM> dold@mitisft.Convergent.COM (Clarence Dold) writes: > I saw this in some code posted to the net awhile ago: > if (foo = 0) /* Really an assignment */ > Which is at least intelligible, and (possibly) rules out item 2 above. > I still don't think it is good coding practice. Probably not, as the if will always evaluate to false. :-) ---Dan