I would like to see CASE expanded to allow multiple, non-sequential options.
eg.
select variable
case 2,3,7
print "2,3 or 7"
...
Oh, I always thought you could write this, but it doesn't work. No error message when compiling or running, it just ignores the 2 and 5
LOCAL n = 5
SELECT n
CASE 1 OR 2 OR 5
DEBUG "1,2 or 5"
CASE 0
DEBUG "0"
DEFAULT
DEBUG "default"
ENDSELECT
I also tried this (which is the way some other languages do it) and it doesn't work either
LOCAL n = 5
SELECT n
CASE 1
CASE 2
CASE 5
DEBUG "1,2 or 5"
CASE 0
DEBUG "0"
DEFAULT
DEBUG "default"
ENDSELECT
No, that way wouldn't be very intuitive in basic :-)