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:15:54 EDT (-0400)
  Re: Global variable changed by Macro without parameters?  
From: Tim Nikias v2 0
Date: 2 Apr 2003 06:39:03
Message: <3e8acbd7@news.povray.org>
I've reread the docs concerning this
declare vs local once again. It might
be possible that this is happening:

The global variables I wish to create with
the Desired_Name-String are local to
the file in which the macro is placed, which
in turn declares the initial variable named
Declared_Name_var.
So the variables are local to "macro.inc", in
which the macros are saved. Nontheless,
the other macros are also saved in that
file, and should also have access to the
variables there, shouldn't they?
The macros itself are called within the main
scene-file.

I'm getting confused about this.

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

> 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?
>
> I'd think that #declare is global in scope,
> and would overwrite another variable with the
> same name, but it doesn't seem to do that. I
> can't make any other sense from the docs, unless
> I've misinterpreted something.
>
> I could cook some sample-scene for this, but
> in this case, someone might have an answer for
> that just on the fly...
>
> --
> Tim Nikias v2.0
> Homepage: http://www.digitaltwilight.de/no_lights
> Email: Tim### [at] gmxde
>
>


Post a reply to this message

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