|
|
In article <01c00a5c$cc13e9e0$8e7889d0@daysix>, "H. E. Day"
<Pov### [at] aolcom> wrote:
> Umm... Chris, you can already modify existing variables.
> #declare A = 435435/2423423^23
> //Varia code
> #declare A=A+anythingyouwant.
>
> Or did you mean something else?
I mean something else, I know you can modify variables. :-)
#set would *only* modify existing variables, if you tried to #set a
nonexistant identifier, an error would be produced. I have sometimes had
a simple typo produce an entirely new variable when I was trying to
modify an existing one, using #set would have prevented that bug(since
an error would have been produced identifying the code which would cause
a problem).
Basically, #declare and #local would create variables(and behave exactly
as they do now, preserving backwards compatibility), #set would modify
the most local variable with the given name. It would make easier to
read scene code(it makes it obvious where the variable is created and
where it is only modified) and find bugs.
It shouldn't be difficult to do, but I can't make much sense of the
parsing code.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|