|
![](/i/fill.gif) |
"Elias Pschernig" <eli### [at] aon at> wrote in message
news:3b0832ce$1@news.povray.org...
> I was avoiding one line of code for every parameter. And i'm going to
> need lots of parameters, as there doesn't seem to be a
> 'record/struct/class' construction in POV :)
There are the arrays, though...
> #macro example(pos)
> #local var_pos = pos // this is what i have to do additionally
> #while
> example(var_pos)
> #local var_pos = var_pos + y // because this should change the
> // local value only
> #end
> #end
Some notes:
- As per docs, you should use #declare var_pos... within the loop to
redefine the local variable.
- Even tough the docs don't properly cover what happens when you use #local
to redefine local variables within loop, it seems to work equivalently to
the above. Note though, that MegaPOV seems have trouble with #undef after
doing this. 3.1g works seems to treat #local for the purpose of redefining
local variables just as it does #declare. I suspect that it may result in
strangeness as well. ;)
-- Nikodemus
Post a reply to this message
|
![](/i/fill.gif) |