|
![](/i/fill.gif) |
Alain wrote:
> Glen Berry nous apporta ses lumieres ainsi en ce 22/06/2004 21:45... :
>
>> I'd like to know if the following things are possible within POV-Ray's
>> scene language, either directly or via some indirect workaround.
>>
>> 1) When doing a while loop, is it possible to conditionally abort the
>> loop and continue processing the rest of the scene file, if a certain
>> condition tests true? I believe this ability exists in some
>> programming languages, but I don't know how to do it with POV.
>>
>>
> Yes like this:
> #local I=0;
> #while(I<10)
> <<some code>>
> #if(stopingcondition)#local SaveIndex=I; // only if you need to
> preserve the index at whitch the stop condition became true.
> #local I=10;#end // Set the loop index past the end value!
> #local I = I + 1;
> #end
>
> Alain
What amazes me about this is one simple question has resulted in three
different answers... ;)
If the POV-Team is following this: Might I suggest a #break and a
#continue statement? :)
Post a reply to this message
|
![](/i/fill.gif) |