|
![](/i/fill.gif) |
Hi,
if I declare a macro like
#macro Macro(A)
#declare A = A + 1;
#end
or
#macro Macro(A)
#local A = A + 1;
#end
and call it like
#declare X = 1;
Macro(X)
X cahnges to 2. That's like calling a function in C by reference.
The documentation (page 106) says:
"When the macro is invoked, a new local symbol table is created. The
actual parameters are assigned to formal parameter identifiers as
local, temporary variables. POV-Ray jumps to the body of the macro and
continues parsing until the matching #end directive is reached. There,
the local variables created by the parameters are destroyed as well as
any local identifiers expressly created in the body of the macro."
I think, this is a contradiction to the effect above.
Does anyone know if it's a bug or didn't I understand the
documentation right?
Thanks in advance,
Friedemann
Friedemann Schmidt
Fri### [at] Stones com
Raytracing-Gallery: http://www.rz.fhtw-berlin.de/~s0049669
Post a reply to this message
|
![](/i/fill.gif) |