Sure would be nice if case statements could do everything that if statements can do:
- if in comma separated list
- if greater then, less than…
- if matches regular expression
You got to a situation where you’ve got a huge switch with 10 case statements. Then you realise that two of those case statements are effectively the same, so you want to replace “case FOO” with “case FOO or BAR”. And you can’t. And the only solution is to convert the entire thing into some god awful ugly mass of IF…THEN…ELSE…IF… (nested!), or some kind of hybrid (IF…THEN…ELSE SWITCH).
(Alternative solution: make an ELSE-IF action).
Steve