Disappearing function call
Geoff Kimbrough
geoff at ism780c.UUCP
Fri Oct 3 05:37:22 AEST 1986
In article <357 at cullvax.UUCP> drw at cullvax.UUCP (Dale Worley) writes:
>What I want to do is to write a function call of a variable number of
>arguments:
> debug(x, y, z, ...)
I've used this construction
#if DEBUG
#define debug(X) printf X /* note NO parentheses */
#else
#define debug(X)
#endif
and written
debug(( "stuff =%x blek = %d", var1,var2)) /* note double parentheses */
seems to work for me.
You're welcome.
More information about the Comp.lang.c
mailing list