Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site oddjob.UUCP
Path: utzoo!watmath!clyde!cbosgd!ihnp4!oddjob!sra
From: sra@oddjob.UUCP (Scott R. Anderson)
Newsgroups: net.lang.c
Subject: Re: Is this correct action for the c compiler/preprocessor ??
Message-ID: <1034@oddjob.UUCP>
Date: Tue, 5-Nov-85 01:19:32 EST
Article-I.D.: oddjob.1034
Posted: Tue Nov  5 01:19:32 1985
Date-Received: Thu, 7-Nov-85 03:50:10 EST
References: <8510301206.AA27124@ucbvax.berkeley.edu> <326@mcgill-vision.UUCP>
Reply-To: sra@oddjob.UUCP (Scott R. Anderson)
Organization: University of Chicago, Department of Physics
Lines: 20

In article <326@mcgill-vision.UUCP> mouse@mcgill-vision.UUCP (der Mouse) writes:
>> #define BAD_SEGMENT     29
>> #define ERROR(number)   printf("Error number %d\n",number);
>> main() {
>>        ERROR(BAD_SEGMENT);
>> }
>
>All current preprocessors I know
>of substitute  "number"  inside the double  quotes as  well.  Of course,
>this is not serious; merely rewrite ERROR as
>
>#define ERROR(n) printf("Error number %d\n",n);

Maybe you want a formal argument besides "n"?  This expands into

       printf("Error number %d\BAD_SEGMENT",    29);;	(:-)
-- 

					Scott Anderson
					ihnp4!oddjob!kaos!sra