|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 2017-04-05 19:56, also sprach Bald Eagle:
> 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?
>
>
This is not so ugly, compared to a #switch:
#if (word = "foo")
...
#elseif (word = "bar")
...
#elseif (word = "baz")
...
#end
--
dik
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le_Forgeron <jgr### [at] freefr> wrote:
> for letter, you can convert it to its code in the switch clause :
>
> #switch(asc(Char))
> #case(65)
> ...
Yes, an excellent suggestion! I will try to remember that.
> No clue for words, sorry.
Following your idea,
There's probably a way to generate a unique hash value.
Thanks as always :)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |