How SHOULD these macros work?

Eric Schweitz schweitz at lexvmc.iinus1.ibm.com
Sat Feb 16 03:05:32 AEST 1991


From: schweitz at lexvmc.iinus1.ibm.com
Date: 15 February 1991, 10:41:22 EST

I have a question concerning the preprocessor. Namely, what behavior
SHOULD be expected from the following:

#define one val1,val2
#define two(arg1,arg2)  arg1+arg2
....
   two (one)  // ?

Should this evaluate to:

a) val1+val2
  -or-
b) val1,val2+

Please excuse me if this is a neophyte question.
Also, is this behavior different of the same for C and C++?

Thanks,
Schweitz        schweitz at lexvmc.iinus1.ibm.com



More information about the Comp.lang.c mailing list