Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ucla-cs.ARPA Path: utzoo!watmath!clyde!cbosgd!ihnp4!mhuxn!mhuxb!mhuxr!ulysses!allegra!mit-eddie!genrad!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!trwrb!cepu!ucla-cs!alex From: alex@ucla-cs.UUCP Newsgroups: net.lang.c Subject: Re: C-Debug package ... (a la "context-independent macros") Message-ID: <3665@ucla-cs.ARPA> Date: Sun, 3-Feb-85 15:10:35 EST Article-I.D.: ucla-cs.3665 Posted: Sun Feb 3 15:10:35 1985 Date-Received: Thu, 7-Feb-85 02:40:47 EST References: <1885@wateng.UUCP> <1089@hcrvx1.UUCP> <33@daisy.UUCP> <1097@hcrvx1.UUCP> <1924@wateng.UUCP> <11839@gatech.UUCP> Reply-To: alex@ucla-cs.UUCP (Alex Quilici) Distribution: net Organization: UCLA Computer Science Department Lines: 8 [Debugged] Wherever possible a macro should expand into an expression. #define assert(x) (!(x) ? die_miserably("x bombed\n") : 1) will do what is desired--if x is untrue, die_miserably will be executed. (Maybe this could even be improved by casting the result to void?)