C-Debug package ... (a la "context-independent macros")

alex at ucla-cs.UUCP alex at ucla-cs.UUCP
Mon Feb 4 06:10:35 AEST 1985


[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?)  



More information about the Comp.lang.c mailing list