Assignment in test: OK?
Dan Bernstein
brnstnd at kramden.acf.nyu.edu
Thu Sep 13 07:17:19 AEST 1990
In article <1599 at mitisft.Convergent.COM> dold at 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
More information about the Comp.lang.c
mailing list