C DEBUG macro (stop me if you"ve heard this)

utzoo!decvax!harpo!floyd!vax135!ariel!houca!hogpc!houxm!houxz!hocda!spanky!ka utzoo!decvax!harpo!floyd!vax135!ariel!houca!hogpc!houxm!houxz!hocda!spanky!ka
Fri Apr 29 14:40:59 AEST 1983

To make a DEBUG macro which can handle arbitrary printf statements, say

#define DEBUG(arglist)	printf arglist

and invoke with double parnethesis around the argument list, as in

	DEBUG(("x = %d\n", x));

Kenneth Almquist

More information about the Comp.lang.c mailing list