Basic30 Language Reference
Select Statements

Execute a different group of statements depending on the value of an expression.

Select Case testExpression
  
[ Case expression
     
[ statements ] ]
  [ Case Else
      [ elseStatements] ]
End Select
testExpression
Required numerical expression. Boolean, Single, and String data types not yet supported.
expression
Required for the Case statement and can take one of the following formats:
l. a literal number
2. expression 1 To expression 2
3. Is comparison literal number (where comparison is one of the following : >, <, >=, <=)
statements
Optional block of statements to be executed when the value of testExpression matches the expression in the corresponding Case statement
Else statements
Optional block of statements to be executed if all previous Case statements return false.

Examples:

Select Case a
    case 1
        PORTB=0
    case 2 to 3
        PORTB=2
    Case Is < 10
        PORTB=2
    Case Else
        PORTB=3
End Select