Re: switch statement
- Posted by achury Mar 25, 2009
- 1364 views
Note how qbasic does it:
SELECT CASE Expression CASE IS >= 5 ... CASE 2 TO 4 ... CASE 1 ... CASE ELSE ... END SELECT
The "IS" token precedes complex expression, this way simple expressions get a fast processing.
Will be great if the switch can process sequences. But may become very complex like this
for i=1 to 5 do select case my_sequence[i] case "" ... case other_sequence[i] ... case else ... end select
May be a very powerfull, but not easy to eval