
2 Mar
2011
2 Mar
'11
9:11 a.m.
Hello, I would like to write a macro MY_MACRO(x) that does different things based on the structure of its input, e.g. something different for each of the following forms: MY_MACRO(x) // a single token MY_MACRO((x, y)) // a parenthesized list of two tokens MY_MACRO((x, y, z)) // a parenthesized list of three tokens MY_MACRO(x y) // two tokens MY_MACRO(x y z) // three tokens MY_MACRO(x = y) // three tokens with the second one being something specific Are any of these possible? Thanks, Nate.