Is it possible to pass something containing a comma as an argument for a macro?
Printable View
Is it possible to pass something containing a comma as an argument for a macro?
Some options (there may be more):
1. If the comma is inside parentheses it will not be considered an argument
2. Maybe if you pass the argument as a macro name (not sure if this works)Code:#define macro(args) function args
macro((1,2))
3. If that doesn't work make it a function:Code:#define argument something, with, a, comma
macro(argument)
Code:#define argument() something, with, a, comma
#define macro(arg) do_something(arg())
macro(argument)
thanks,
#define COMMA ,
seemed to do the trick.