Commas in macro arguments
Peter da Silva
peter at ficc.uu.net
Mon Mar 26 03:43:59 AEST 1990
> >#define call(a,b) a(b)
> >I can use that to call a function with one argument. How can I use
> >it to call a function with two arguments? In other words: How do I
> >pass a string containing a comma as the second argument to the macro?
> You can't.
Sometimes you can, depending on how much you want to munge the arguments:
#define call(a,b) a b
call(a,(b))
call(c,(d,e))
--
_--_|\ `-_-' Peter da Silva. +1 713 274 5180. <peter at ficc.uu.net>.
/ \ 'U`
\_.--._/
v
More information about the Comp.lang.c
mailing list