POV-Ray : Newsgroups : povray.advanced-users : Break out of main while (1) loop using #break directive in a sub-loop state= : Re: Break out of main while (1) loop using #break directive in a sub-loop s= Server Time
25 Apr 2024 03:16:16 EDT (-0400)
  Re: Break out of main while (1) loop using #break directive in a sub-loop s=  
From: Tor Olav Kristensen
Date: 15 Jan 2023 21:20:00
Message: <web.63c4b3c27c2309d2383c879289db30a9@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> So, clearly the flow control in this other language is different than SDL,
>
> I have a while (1) with an #if, and then other little nested bits like:
>
> #if (A >= 0)
>      #for (m, 0, 3)
>           #if (tris[A][m]=R){
>                #local tris[A][m]=L;
>                #break;
>           #end
>      #end
> #end
>
> I'm assuming some, or all of those #break statements are meant to exit the
> #while(1), but of course, they don't, and so I'm stuck in the dreaded infinite
> loop.
>
> Please advise.

I recommend that you do not use break in loops.
I've not yet seen a case where it cannot be avoided.

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

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