POV-Ray : Newsgroups : povray.unofficial.patches : MegaPOV quirks and questions.. : Re: MegaPOV quirks and questions.. Server Time
2 Sep 2024 06:19:52 EDT (-0400)
  Re: MegaPOV quirks and questions..  
From: Alex Vandiver
Date: 25 Jul 2000 09:03:21
Message: <397D8F55.F460E295@tiac.net>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.