Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!decwrl!labrea!rutgers!mtunx!whuts!homxb!hropus!jgy From: jgy@hropus.UUCP (John Young) Newsgroups: comp.unix.wizards Subject: Re: #defines with variable # arguments Message-ID: <152@hropus.UUCP> Date: 13 May 88 22:21:54 GMT References: <2855@phoenix.Princeton.EDU> <52949@sun.uucp> Distribution: na Organization: Bell Labs, Holmdel, NJ Lines: 14 Posted: Fri May 13 18:21:54 1988 > > > Are there any versions of cpp which allow one to define macros which > > accept variable numbers of arguments? I think that some of the AT&T CPLU compilers(cpp's) allow this, you just overdeclare the arguments: #define Dprintf(a,b,c,d,e,f,g,h,i) {if (Debug) printf(a,b,c,d,e,f,g,h,i);} and compile. You will get a warning about each source line which uses the wrong number of arguments.