POV-Ray : Newsgroups : povray.general : Global variable changed by Macro without parameters? : Re: Global variable changed by Macro without parameters? Server Time
4 Aug 2024 16:13:14 EDT (-0400)
  Re: Global variable changed by Macro without parameters?  
From: Christoph Hormann
Date: 2 Apr 2003 06:35:28
Message: <3E8ACB00.B3B104AF@gmx.de>
"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

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