POV-Ray : Newsgroups : povray.advanced-users : #continue Server Time
28 Mar 2024 14:07:26 EDT (-0400)
  #continue (Message 1 to 3 of 3)  
From: Mike Horvath
Subject: #continue
Date: 28 Mar 2017 23:07:18
Message: <58db24e6$1@news.povray.org>
POV-Ray currently supports the #break directive in loops, but not the 
#continue directive found in many programming languages. Is there a 
simple way to emulate this behavior? Thanks!


Mike


Post a reply to this message

From: clipka
Subject: Re: #continue
Date: 29 Mar 2017 12:20:34
Message: <58dbded2@news.povray.org>
Am 29.03.2017 um 05:07 schrieb Mike Horvath:
> POV-Ray currently supports the #break directive in loops, but not the
> #continue directive found in many programming languages. Is there a
> simple way to emulate this behavior? Thanks!

I'm not aware of any simple solution.


Post a reply to this message

From: Mike Horvath
Subject: Re: #continue
Date: 29 Mar 2017 20:02:20
Message: <58dc4b0c$1@news.povray.org>
On 3/29/2017 12:20 PM, clipka wrote:
> Am 29.03.2017 um 05:07 schrieb Mike Horvath:
>> POV-Ray currently supports the #break directive in loops, but not the
>> #continue directive found in many programming languages. Is there a
>> simple way to emulate this behavior? Thanks!
>
> I'm not aware of any simple solution.
>

I found a workaround for my needs.

	#for (j, 0, 6)
		// flag to skip this loop or not
		#local pass_me = true;
		#if (something bad happens)
			#local pass_me = false;
		#end
		// if no problems encountered...
		#if (pass_me = true)
			do something
		#end
	#end

Mike


Post a reply to this message

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