POV-Ray : Newsgroups : povray.general : fundamental question re: #switch/#case/#break : Re: fundamental question re: #switch/#case/#break Server Time
30 Jul 2024 00:30:07 EDT (-0400)
  Re: fundamental question re: #switch/#case/#break  
From: Kenneth
Date: 27 Nov 2010 08:45:01
Message: <web.4cf10a9b2f7b65a8196b08580@news.povray.org>
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


Post a reply to this message

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