Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2(pesnta.1.2) 9/5/84; site scc.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!ihnp4!zehntel!hplabs!pesnta!scc!ted
From: ted@scc.UUCP (Ted Goldstein)
Newsgroups: net.lang.c
Subject: Wish List for CPP
Message-ID: <174@scc.UUCP>
Date: Mon, 1-Oct-84 16:04:48 EDT
Article-I.D.: scc.174
Posted: Mon Oct  1 16:04:48 1984
Date-Received: Thu, 4-Oct-84 03:37:35 EDT
Distribution: net
Organization: Santa Cruz Computer, Inc, Aptos, Calif.
Lines: 75



As long as we are compiling a wish list, how about
having CPP count arguments. For example instead of
writing:


#ifdef DEBUG_ON
#define DEBUG1(a)   printDebug(1, a)
#define DEBUG2(a,b)   printDebug(2, a, b)
/* etc */
#else
#define DEBUG1(a)
#define DEBUG2(a,b) 
/* etc */
#endif

we could write

#ifdef DEBUG_ON
#define DEBUG(,) printDebug(numArgs, )
#else
#define DEBUG(,)
#endif

This would also assist in validating things like printf:

#define printf(,) _printf(numArgs,)

if numArgs doesn't  agree with the number of formatting
expressions, it could complain.

Any comments?
	Ted Goldstein


From postnews Mon Oct  1 12:03:23 1984

Subject: Re: Fuel for your flames: Things I would like in CPP
Newsgroups: net.lang.c
References: <9225@watmath.UUCP>


As long as we are compiling a wish list, how about
having CPP count arguments. For example instead of
writing:


#ifdef DEBUG_ON
#define DEBUG1(a)   printDebug(1, a)
#define DEBUG2(a,b)   printDebug(2, a, b)
/* etc */
#else
#define DEBUG1(a)
#define DEBUG2(a,b) 
/* etc */
#endif

we could write

#ifdef DEBUG_ON
#define DEBUG(,) printDebug(numArgs, )
#else
#define DEBUG(,)
#endif

This would also assist in validating things like printf:

#define printf(,) _printf(numArgs,)

if numArgs doesn't  agree with the number of formatting
expressions, it could complain.

Any comments?
	Ted Goldstein