Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!ncar!ico!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Using Macros Message-ID: <17332@haddock.ima.isc.com> Date: 9 Aug 90 22:40:33 GMT References: <362.26be9dcc@astro.pc.ab.com> <21057@grebyn.com> <642@travis.csd.harris.com> <17298@haddock.ima.isc.com> <46860@brunix.UUCP> <10881@crdgw1.crd.ge.com> <1752@tuvie> Reply-To: karl@kelp.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 21 The source of the problem is the name of the macro. It's not at all clear whether `CHECK' should mean `assert' or `forbid'. In article <1752@tuvie> hp@vmars.tuwien.ac.at (Peter Holzer) writes: >Karl obviously interpreted it the same way [as a `forbid' macro] I noticed that the `||' version had the `assert' semantics, which I retained in my second example (which I actually wrote first), assuming this was the intent. I then wrote the `?:' version while looking at the `if' version of the original. I even checked it against the copy in , noting that the operands were in the opposite order, which I accepted because the `if' version did indeed have the semantics of `forbid' rather than `assert'. It completely slipped my mind that I'd just made the opposite observation a minute earlier! >It is amazing though, that the Walking Lint missed the ||-&& confusion. What I missed was that the two versions were inconsistent--I actually had the right model for `a || b' in mind. Karl W. Z. Heuer (karl@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint