POV-Ray : Newsgroups : povray.pov4.discussion.general : I want to be rid of my stupid mistakes : Re: I want to be rid of my stupid mistakes Server Time
19 May 2024 07:01:00 EDT (-0400)
  Re: I want to be rid of my stupid mistakes  
From: clipka
Date: 22 Jul 2009 14:30:00
Message: <web.4a6759ad97aca27169042aac0@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> Perhaps the easiest and most universal solution to implement would be to add a
> global "loop_limit" variable that would set the maximum number of loops allowed
> (similar to max_trace value).  POV would then only need to keep track of the
> number of iterations the current loop has gone through and kick it out when it
> reaches the limit, rather than tracking any number of variables.

That sounds like an option.

I'm not sure though whether it would be superior to just waiting for the user to
decide that it was about time for the parsing to finish.


> I would
> expect that POV would also report an error (without aborting) to the message
> window that a loop was terminated with the line number for debugging purposes.

I disagree. Just dropping out of a loop before all conditions have been
established that might be presumed by the following code may mess up, and in
some cases (software using #write) actually have the potential to mess up data.


Maybe just printing a debug info but continuing with the loop would be the most
sensible thing to do; if the user finds that it doesn't make sense to keep the
loop going, he can abort the render anytime.


> The one disadvantage to this is that it would be globaL and apply to all loops
> within the scene.

I don't see a problem with that. Of couse you could specify a max iteration
thing per loop, but then again that would be quite redundant in the cases it's
most needed.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.