Article View: net.lang.c
Article #9472Re: Disappearing function call
From: Geoff Kimbrough
Date: Thu, 02 Oct 1986 19:37
Date: Thu, 02 Oct 1986 19:37
14 lines
1039 bytes
1039 bytes
In article <357@cullvax.UUCP> drw@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.
Technical Details
Message-ID:
<3724@ism780c.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!rutgers!nike!cit-vax!elroy!smeagol!usc-oberon!sdcrdcf!ism780c!geoffReferences:
<357@cullvax.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!rutgers!nike!cit-vax!elroy!smeagol!usc-oberon!sdcrdcf!ism780c!geoff From: geoff@ism780c.UUCP (Geoff Kimbrough) Newsgroups: net.lang.c Subject: Re: Disappearing function call Message-ID: <3724@ism780c.UUCP> Date: Thu, 2-Oct-86 15:37:22 EDT Article-I.D.: ism780c.3724 Posted: Thu Oct 2 15:37:22 1986 Date-Received: Sat, 4-Oct-86 11:24:26 EDT References: <357@cullvax.UUCP> Reply-To: geoff@ism780c.UUCP (Geoff Kimbrough) Organization: Interactive Systems Corp., Santa Monica, CA Lines: 14