POV-Ray : Newsgroups : povray.general : The Language of POV-Ray : Re: The Language of POV-Ray Server Time
10 Aug 2024 13:19:59 EDT (-0400)
  Re: The Language of POV-Ray  
From: Chris Huff
Date: 9 Mar 2000 18:19:04
Message: <chrishuff_99-90BDDE.18205009032000@news.povray.org>
In article <38c82aca@news.povray.org>, "David Curtis" 
<spa### [at] junkmailcom> wrote:

> For me the greatest addition would be a switch/case statement, like this:
> 
> #switch (some_variable)
>     #case int, float, vector, ...
>     #end
> #end

You mean like this? :-)
Straight from the manual:

"4.2.6.3  The #switch, #case, #range and #break Directives

A more powerful conditional is the #switch  directive. The syntax is as 
follows...

SWITCH_DIRECTIVE:
#switch (   Switch_Value  )   SWITCH_CLAUSE...  [#else   TOKENS...] #end

SWITCH_CLAUSE:
#case(   Case_Value  )  TOKENS...  [#break ] |
#range(   Low_Value  ,  High_Value  )  TOKENS...  [#break ]"

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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