|
![](/i/fill.gif) |
> 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.
It is in an include, sorry in the above example the macro is in another
file. Try this (two files):
// file1.inc
#macro A(B)
#local B = 5;
#end
// file2.pov
#include "file1.inc"
#declare X = 10;
A(X)
#warning concat("X = ",str(X,0,0))
X comes out as 5, but I would have expected 10.
Post a reply to this message
|
![](/i/fill.gif) |