|
|
"bgimeno" <bgimeno[at]persistencia[dot]org> wrote:
> The following code is perfectly valid to the present version, but does not
> produce anything.
>
> #declare FooCount = 0 ;
> #while (FooCount < 100 )
> sphere {<0,FooCount,0>,1 pigment { rgb< 1, 1, 0> } }
> // #declare FooCount = FooCount + 1 ; // note this missing line
> #end
>
> I suppose that a "detector" of infinite loops is it too much to ask?
>
> B. Gimeno
When I write a counting loop, I tend to do it as follows:
#declare FooCount = 0 ; #while (FooCount < 100 )
> BLAH BLAH BLAH
#declare FooCount = FooCount + 1 ; #end
I know there are circumstances where this can't be done, but I find it helps me
recognize my "for" type loops easily.
-tgq
Post a reply to this message
|
|