POV-Ray : Newsgroups : povray.advanced-users : Non-float #case values : Re: Non-float #case values Server Time
20 Apr 2024 02:27:08 EDT (-0400)
  Re: Non-float #case values  
From: Le Forgeron
Date: 6 Apr 2017 12:16:44
Message: <58e669ec$1@news.povray.org>
Le 06/04/2017 à 01:56, Bald Eagle a écrit :
> Would it take a lot to implement values in a #switch block, so that letters or
> words could be used as selection criteria as well?
> 
> If not, or for the time being, is there a more elegant way to do this other than
> a ton of #if ... #end's, or creating some sort of conversion index for the
> strings?
> 
> 

for letter, you can convert it to its code in the switch clause :

#switch(asc(Char))
#case(65)
...


No clue for words, sorry.


Post a reply to this message

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