POV-Ray : Newsgroups : povray.general : fundamental question re: #switch/#case/#break : Re: fundamental question re: #switch/#case/#break Server Time
30 Jul 2024 00:31:02 EDT (-0400)
  Re: fundamental question re: #switch/#case/#break  
From: Jim Holsenback
Date: 27 Nov 2010 09:15:25
Message: <4cf1127d$1@news.povray.org>
On 11/27/2010 09:41 AM, Kenneth wrote:
> clipka <ano### [at] anonymousorg> wrote:
>> Am 26.11.2010 08:50, schrieb Kenneth:
> 
>>> Thanks, Jim. (Clipka's Change 4942 is quoted verbatim in the WIKI, I believe.)
>>
>> Doesn't seem like that. Original description of change #4942 was as follows:
> 
> Sorry, you're right. (In all the cross-referencing I was doing between various
> WIKI pages/3.6.1 docs/beta-test page at POV-Ray.org, I got a bit confused!)
>>
>>> I.e., (as a simple analogy) does #else now have an 'implied'
>>> #break before it?
>>
>> The wording in the Wiki is wrong; in a #switch statement, #else acts
>> like a #range that encompasses any possible number (*), i.e. the
>> preceding #case or #range must be ended with a #break statement if
>> execution should not continue into the #else block.
> 
> Thanks; well-put, and completely clarified now. (This would make a good addition
> to the WIKI, too.)
> 
> Ken
> 
> 
> 
certainly a lot of bandwidth over something that should have been a
trivial matter ... done


Post a reply to this message

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