L
luser- -droog
I remember reading something from Knuth to the effect that you don't
really need multiple argument macros because you can yield a macro
name from the macro expansion and call that with a new argument.
So I tried a little experiment:
#define A(x) x + B
#define B(y) y y y
A(2)(3)
And I'll be darned if gcc -E doesn't produce:
2 + 3 3 3
But I'm not really doing this right, am I? Does anyone have
suggestions for where I could learn more? (more Knuth?)
really need multiple argument macros because you can yield a macro
name from the macro expansion and call that with a new argument.
So I tried a little experiment:
#define A(x) x + B
#define B(y) y y y
A(2)(3)
And I'll be darned if gcc -E doesn't produce:
2 + 3 3 3
But I'm not really doing this right, am I? Does anyone have
suggestions for where I could learn more? (more Knuth?)