POV-Ray : Newsgroups : povray.general : does #break work as intended with #if statements? : does #break work as intended with #if statements? Server Time
5 Aug 2024 16:11:44 EDT (-0400)
  does #break work as intended with #if statements?  
From: Shay
Date: 19 Aug 2002 14:19:19
Message: <3d6136a7$1@news.povray.org>
I expected that #break would ignore the #end in an #if statement and proceed
to the #end of the current #while loop, but this is not the case. Is this
intended?

An example:

#while (True)
  #if (True) #break #end
#end

Will loop forever. It would sure help speed up some code if this worked
differently. Is there a reason why #break behaves the way it does with #if
statements?

Just an additional thought. It would also be very cool if

 #while (condition & condition)

would not evaluate the second condition if the first were false. I think
that implementing this might cause a slow-down in code where the behavior
was not needed, however.

 -Shay


Post a reply to this message

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