POV-Ray : Newsgroups : povray.text.scene-files : Weird Loop Behavior : Re: Weird Loop Behavior Server Time
16 Apr 2024 00:26:51 EDT (-0400)
  Re: Weird Loop Behavior  
From: jr
Date: 12 Jul 2022 02:55:00
Message: <web.62cd19cca05c0a6d1be3cd4b6cde94f1@news.povray.org>
hi,

"Dave Blandston" <IsN### [at] protonmailch> wrote:
> ...
> There are two issues with this code. One might be a bug in POV-Ray, and the
> other is probably a feature but it doesn't work the way that would make sense to
> me. (Disclaimer: I'm an amateur so there's probably a reason that it works the
> way that it does that I'm not aware of.)
>
> Issue number one, possible POV bug: When I run the attached file with version
> 3.7, the final result that's displayed is 80% success rate. This is not an
> anticipated result. However, un-commenting the line "#local Dummy = 0;" changes
> the final result to 50% success rate, which appears to be correct. The variable
> "Dummy" is never used and should have no effect on anything.
>
> Issue number two, #break directive behavior: Without the #if () test marked with
> the comment "//Why is this test necessary?" the #break directive will exit not
> only the #for (K...) loop, but also the #for (J...) loop if the #break directive
> is executed on the last iteration of the #for (K...) loop. When that happens,
> the remainder of the #for (J...) loop is not completed as it should be (or as I
> think it should be, anyway).
>
> I'm mentioning these issues in case they might persist into version 3.8...

"Issue number one" -- a beauty :-) -- also happens in 3.8.0-beta.2, on a Linux.
need to do more/better tests of "Issue number two" but didn't see a difference
with conditional commented out.


regards, jr.


Post a reply to this message

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