|
|
> MyUnion.foreach( #(Obj){...do stuff with Obj} );
[...]
> (3..7).foreach( #(n){debug(n)} );
[...]
> 5.times( #debug("Hello!") );
Even Better!
> foo.setColorRGB(0.2, 0.6, 0.8);
>
> would translate to:
>
> foo setColorR:0.2 G:0.6 B:0.8;
Hm. Looks strange :) I think the missing brackets make it harder to
read, even with this pretty simple expression. But your example looks
like it supports named parameters, that's a nice thing, coupled with
optional parameters:
#macro MyMacro(Length,Height,Width,optional Color) #end
MyMacro(Length = 10, Width = 5, Height = 3)
MyMacro(Length = 10, Color = rgb .5, Width = 5, Height = 3)
Florian
--
camera{look_at-y*10location<8,-3,-8>*10}#local a=0;#while(a<999)sphere{
#local _=.01*a-4.99;#local p=a*.01-5;#local c=.01*a-4.995;<sin(p*pi)*5p
*10pow(p,5)*.01>sin(c*c*c*.1)+1pigment{rgb 3}}#local a=a+1;#end
/******** http://www.torfbold.com ******** http://www.imp.org ********/
Post a reply to this message
|
|