POV-Ray : Newsgroups : povray.general : fundamental question re: #switch/#case/#break : Re: fundamental question re: #switch/#case/#break Server Time
29 Jul 2024 18:21:53 EDT (-0400)
  Re: fundamental question re: #switch/#case/#break  
From: Darren New
Date: 22 Nov 2010 15:01:19
Message: <4ceacc0f$1@news.povray.org>
clipka wrote:
> C++, Java, JavaScript and C# also use this concept 

FWIW, C# is different. Each section of the switch has to end in either a 
break or a goto, and if you want "fallthrough", you goto a different case 
label. Best of both worlds: you get to share cases if you want, but the 
cases are still independent, so you can (for example) rearrange them without 
breaking your code.

Plus, you don't get to do things like put while loops around the cases but 
inside the switch. :-)

-- 
Darren New, San Diego CA, USA (PST)
   Serving Suggestion:
     "Don't serve this any more. It's awful."


Post a reply to this message

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