Article View: comp.std.c
Article #1123Re: Commas in macro arguments
From: Peter da Silva
Date: Sun, 25 Mar 1990 17:43
Date: Sun, 25 Mar 1990 17:43
19 lines
972 bytes
972 bytes
> >#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@ficc.uu.net>.
/ \ 'U`
\_.--._/
v
Technical Details
Message-ID:
<T9H20-9ggpc2@ficc.uu.net>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!texbell!sugar!ficc!peterReferences:
<1990Mar22.203048.18491@dde.dk> <1990Mar23.164301.14975@utzoo.uucp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!texbell!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.std.c,comp.lang.c Subject: Re: Commas in macro arguments Message-ID: <T9H20-9ggpc2@ficc.uu.net> Date: 25 Mar 90 17:43:59 GMT References: <1990Mar22.203048.18491@dde.dk> <1990Mar23.164301.14975@utzoo.uucp> Reply-To: peter@ficc.uu.net (Peter da Silva) Followup-To: comp.lang.c Organization: Xenix Support, FICC Lines: 14