POV-Ray : Newsgroups : povray.advanced-users : Macros in Macros? : Re: Macros in Macros? Server Time
29 Jul 2024 06:21:00 EDT (-0400)
  Re: Macros in Macros?  
From: Tim Nikias
Date: 20 Oct 2002 19:09:03
Message: <3db3378f@news.povray.org>
Okay, it works, almost like I expected it to...

When a #local (from inside an #included
file inside a macro) needs to be changed in
yet another included file (which is included inside
the macro which is included the original file),
using #local would create a #local to that
file. When using #declare, it accesses the #local
parameter of the original included file, but since
it is local inside the macro, it will be destroyed
when the macro is finished.

Quite difficult to think through, but works as
is expected. One has to think of the macro and
locals within as a capsule, which itself has again
local and global. Using declare of a local file
is so to speak global to the macro, but still
local to the original file which has included the
file in which the macro is set...

Phew. Quite difficult. Now that I'm working
in "layers", I hope I get everything done the correct
way... :-)

Regards,
Tim

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

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