|
|
Ken wrote in message <35FFF416.8289C917@pacbell.net>...
>
> What is the difference between nesting and recursion ?
>I just looked at the docs and they state emphaticaly that
>nesting macros is a no no.
>
>Ken
//Nesting example:
#macro Marco1 ( center1, r1)
sphere ( center1, r1 )
#macro Macro2 ( center2, r1);
cylinder { center1, center2, r2 }
#end
#local vector1 = center1 + 5*y;
Macro2 ( vector1, r1 )
#end
//And here's a recursion example
#macro Macro3 (n)
#if ( n > 0 )
#local m=n-1
Macro3 ( m )
#end
#end
The first is forbidden, the second is allowed. Both are dumb and useless :)
Peter
Post a reply to this message
|
|