Disappearing function call

Gregory Smith greg at utcsri.UUCP
Tue Oct 7 00:48:17 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, ...)
>
>that will generate no code when the symbol DEBUG is not defined, but
>generate a call of some function (say, debug_()) when it is.  If

You could write

	debug( ( x,y,z ) );

In the code, and

#ifdef	DEBUG
# define debug(list) _debug list
#else
# define debug(list)
#endif
-- 
----------------------------------------------------------------------
Greg Smith     University of Toronto      UUCP: ..utzoo!utcsri!greg



More information about the Comp.lang.c mailing list