R
Ron
In macro invocation, what kind of tokens can I pass as arguments?
Another question: can I pass more than one token for single arguments? eg.
#define MYMACRO(arg1, arg2) arg1 arg2
MYMACRO("abc" L'd' .12, "def")
Is it valid? But if I can pass anything I could even pass a comma since
it's a preprocessing token, ok? So i could write:
MYMACRO("abc" , L'd' .12, "def")
That is ambiguous since it's not clear if the first comma closes the first
argument or if it's just another token to pass. Please, give me an answer.
Greetings.
ps: i'm supposing that c and c++ preprocessors follow almost the same rules,
but not sure it's right.
Another question: can I pass more than one token for single arguments? eg.
#define MYMACRO(arg1, arg2) arg1 arg2
MYMACRO("abc" L'd' .12, "def")
Is it valid? But if I can pass anything I could even pass a comma since
it's a preprocessing token, ok? So i could write:
MYMACRO("abc" , L'd' .12, "def")
That is ambiguous since it's not clear if the first comma closes the first
argument or if it's just another token to pass. Please, give me an answer.
Greetings.
ps: i'm supposing that c and c++ preprocessors follow almost the same rules,
but not sure it's right.