POV-Ray : Newsgroups : povray.advanced-users : Macros in Macros? : Re: Macros in Macros? Server Time
29 Jul 2024 06:16:36 EDT (-0400)
  Re: Macros in Macros?  
From: Tim Nikias
Date: 20 Oct 2002 18:58:57
Message: <3db33531$1@news.povray.org>
Hm... Lets just describe this:
An include file contains a macro. Only an
object-declaration inside this macro is
declared, everything else is local...

So, when I call the macro, the declared
object is accessable. Now, inside the
macro, other files are included (which I did
a long time ago to keep different cores
of algorithms apart and easy accessable
for further development). Certain parts
now have to be declared, in order for
the macro to see the thereby generated
data... Right?

Hm. But all #local of the macro are visible
to the included files (checked that one), but
what if I change them inside the included
files? Using locals creates a new parameter
local to that file. Does #declare now use the
formerly local value to the macro, or does it
overwrite it?
And then, after I've used declare, are those
values visible when the macro has finished?
I'll fiddle with it, but I hope that someone might
have an answer (would be quite painful if this
doesn't work out...).

Regards,
Tim


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

>
> #local variables only exist within the macro that uses them, or, if
> declared in an include file outside a macro, exist until the end of that
> file.
> #declare variables are global in scope and permanent in duration.
> (see Doc: 6.2.2.2)
>
> All macro names are global in scope and permanent in duration.
> (see Doc: 6.2.8.1: )
>
> --
> Mike Williams
> Gentleman of Leisure


Post a reply to this message

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