|
|
> How can it be wrong when his macro is not returning anything ?
> (Note that he is using #local instead of #declare.)
2.2.2.8.5 explains it a bit, if an identifier is passed to a
macro then that identifier is in scope and #local will
modify that identifier's value.
The return-by-parameter bug is more apparent in loops,
sometimes the modified value of a parameter isn't returned,
but that's less than 1% of the time, and it's fixed in 3.7 :-)
Try this test code to convince yourself that #local in
a macro can modify a parameter value.
#macro TEST(A)
#local A = A + 1;
#end
#declare B = 1;
TEST(B)
text { // the answer is 2
ttf "timrom.ttf",
concat("B = ", str(B,0,0)), 0.1,0
pigment {rgb <0,1,0>}
finish {ambient 1}
translate <-1,-0.2,2>
}
Post a reply to this message
|
|