Select Case


Select {Case} expression

Case expression
...
Case expression
...
Case Else
...

End Select


A Select Case structure is used to test for multiple values of a variable and provide path flows for each of those possible values.
Numeric or string variables may be used.
The Case keyword following the Select statement is optional.
If used, there should be only one Case Else and it must be the last before the End Select.

Case may be followed by multiple values separated by commas

a = 5
Select a

Case 1
    Print "One"

Case 2,3,4,5
    Print "Two - Five"

Case Else
    Print "Out of Range"

End Select



When testing ranges of values it is recommended you use the compound If...Then...ElseIf...EndIf structure.

If ... Then







Become a Patron