|
![](/i/fill.gif) |
>
>
> Hmmm ok, so apparently I misunderstood the POV syntax, this short piece
> of code prints X=9 whereas I assumed it would print X=10. Not sure if
> this is intended behaviour or not.
>
> // start code
>
> #macro A(B)
> #local B = B - 1;
> #end
>
> #declare X = 10;
> A(X)
> #warning concat("X = ",str(X,0,0))
>
> // end code
>
> Will fix the macro and post and update... (it's essentially normalizing
> your sun position, which you're then using the place the light source).
>
Your code develop as:
#declare X = 10;
#local X = X - 1;
In this contex, #local and #declare are synonims.
So, yes, it works as expected.
There is a difference when #local is used in an include file. In an
include, any #local variables only exist within the include.
Post a reply to this message
|
![](/i/fill.gif) |