|
![](/i/fill.gif) |
Thorsten Froehlich wrote:
> Yes it can:
>
> #macro b_version1()
> // do one thing
> #end // macro b, first possibility
>
> #macro b_version2()
> // do something else
> #end // macro b, second possibility
>
> #macro a(foo)
> #if (foo)
> // call b_version1
> #else
> // call b_version2
> #end // if statement
> #end // macro a
No -- you're missing the point. The version I wrote leaves a macro, b(),
defined after a(foo) closes, which is dependant on what foo was at the time
a(foo) was called. What you've got above will _call_ a version once, dependent
on foo, but macros etc after the fact will not themselves be able to call b()
and get a "dynamic" macro.
-Alex V.
Post a reply to this message
|
![](/i/fill.gif) |