In article <6G64h.9243$Wd5 .1258@trnddc05> ,
Max TenEyck Woodbury <ma*@mtew.isa-geek.netwrote:
>I need a macro that will take an arbitrarily long list of arguments
where each argument needs to be passed to another macro.
>Is it possible to write such a macro?
>If so, could you please provide an example?
Not possible in C89: in C89, macros only have no arguments
("object like macro") or a fixed-length list of arguments
("function like macro").
Not possible in C99: in C99, you cannot declare a function-like
macro that might be handed no arguments at all. function-like
macros in C99 must be declared with at least one fixed argument.
I have not looked at C99 handling of macros with variable argument
lists, so I do not know if you can somehow iterate over the arguments
or otherwise indicate that you want something to be done to each of
them in turn.
--
Is there any thing whereof it may be said, See, this is new? It hath
been already of old time, which was before us. -- Ecclesiastes