How to make the first invocation of a macro different from all the next ones ?
- by LB
Hi,
that may be really simple but i'm unable to find a good answer.
How can I make a macro representing first a certain value and then a different one ?
I know that's nasty but i need it to implicitly declare a variable the first time and then do nothing.
This variable is required by other macros that i'm implementing.
Should i leverage "argument prescan" ?
thanks for the answers.
EDIT
To make things clearer.
Suppose i have a macro FOO, and I do something like
FOO
FOO
FOO
I would like the result to be
foo
bar
bar
I don't want the actual code to be cluttered by ifndef. The programmer should only have to write macro invocations.