|
![](/i/fill.gif) |
Three little macro's. The first and third are ok, the second is not. The only
difference between Twee and Drie is the position of the semi-colons. I
understand that a macro works by text replacement. That does not make me
understand why Twee doesn't work and Drie does. Can somebody explain?
#macro Een(A,B,C)
A+B+C
#end //macro
#declare Som1=Een(1,2,3);
sphere {Som1,1}
#macro Twee(A,B,C)
#local P=A+B+C;
#if (P=0)
A+B-C
#else
A+B+C
#end
#end
#declare Som2=Twee(1,2,3);
sphere {Som2,1}
#macro Drie(A,B,C)
#local P=A+B+C;
#if (P=0)
A+B-C;
#else
A+B+C;
#end
#end
#declare Som3=Drie(1,2,3)
sphere {Som3,1}
ingo
--
Met dank aan de muze met het glazen oog.
Post a reply to this message
|
![](/i/fill.gif) |