Using Macros
Christopher R Volpe
volpe at underdog.crd.ge.com
Thu Aug 9 22:15:42 AEST 1990
In article <46860 at brunix.UUCP>, gvr at cs.brown.edu (George V. Reilly) writes:
|>Ah, but Karl, you missed the more important bug that Brad should have
|>used &&, not ||. In Brad's example, exit() will only be called if
|>cond == 0, which is exactly the inverse of what is desired. The same is
|>true of your second offering.
What makes you think that is what was desired? I interpret "CHECK(cond)"
the same way I interpret "ASSERT(cond)", which is "continue iff cond is true".
I.e., exit when cond is false. Under this interpretation, "||" is correct.
|>________________
|>George V. Reilly gvr at cs.brown.edu
|>uunet!brunix!gvr gvr at browncs.bitnet Box 1910, Brown U, Prov, RI 02912
Chris Volpe
G.E. Corporate R&D
volpecr at crd.ge.com
More information about the Comp.lang.c
mailing list