|
|
Its more like:
#macro Init()
#declare Test=1;
#end
#macro Incremenent()
#local Var=Test;
#local Var=Var+1;
#declare Test=Var;
#end
Init()
Incremenent()
No declaration of Test before. Thats
why I'd think that declaring Test inside
Increment() should access the Test
variable and overwrite it.
Or am I mistaken?
--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde
>
>
> "Tim Nikias v2.0" wrote:
> >
> > This is what I'm trying to do:
> > I want global variables, that are affected
> > by macros, without handing the variables
> > as parameters to the macro.
> > To do this, I #declare a variable with
> > the same name as the global, thus hoping to
> > overwrite it. Does that work?
> >
> > [...]
>
> Try:
>
> #declare Test=1;
>
> #macro Macro()
> #declare Test=2;
> #end
>
> Macro()
>
> #debug str(Test,0,0)
>
>
> Christoph
>
> --
> POV-Ray tutorials, include files, Sim-POV,
> HCR-Edit and more: http://www.tu-bs.de/~y0013390/
> Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|