Page 1 of 1

More flexible Switch-Case statement

Posted: Thu Oct 28, 2010 6:18 pm
by jalih
It would be nice, if something like the following would work:

Code: Select all

c = ReadChr(1)

Switch c
	Case 'a' To 'z' Or  'A' To 'Z':
		DebugPrint("Got character")
	Case '0' To '9':
		DebugPrint("Got number")
	Default:
		DebugPrint("Error: impossible character", Chr(c))
		End
EndSwitch

Re: More flexible Switch-Case statement

Posted: Sat Oct 30, 2010 12:03 am
by airsoftsoftwair
That's not likely to come because it is a lot of work :)