|
![](/i/fill.gif) |
In article <3a9eba0c@news.povray.org>, "Rune" <run### [at] iname com>
wrote:
> The code works fine. That is, the mother variable "Var" is only
> accessible if it is not currently being assigned at a lower level.
> But I thought a variable was not supposed to interfere with anything
> before the assignment was completed (semi-colon reached) ? Or is it?
I think this is a bug (if I understand what you mean)...variables inside
a macro should not affect #local variables outside it, even in a macro
that calls it.
> On an unrelated note: Isn't there any way I can make the child macro
> handle and update a variable created in the mother macro, besides
> making the variable global? I'm afraid not?
Other than having it be the return value? Pass it as a parameter...
#macro Child(ChildVar)
#local ChildVar = ChildVar + 1; // line 7
(ChildVar)
#end
#macro Mother(Input)
#local Var = Input;
Child(Var)
#end
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |