In the sample project, I defined a macro
#define FOO(x, y) x + y .
This works great. For example, FOO(42, 1337)evaluated as 1379.
However, now I want to use one more #define:
#define SAMPLE 42, 1337
When I call now FOO(SAMPLE), it won’t work. The compiler tells me that it FOOtakes two arguments, but is called with only one argument.
I assume that the reason for this is that although the macro arguments are evaluated in advance of the function itself, the preprocessor does not parse the entire instruction again after this evaluation. This is similar to the fact that it is not possible to output additional preprocessor macros from a macro.
Is it possible to get the desired functionality?
FOO C . , , , , . , C .
: (x, y) ? 8 . #define -s .