Select ... Case ~ Case Else ~ End Select

Controls the branching of processing in accordance with the expression results.

Select <Expression>
[Case <Value> 
    <Case statement within the block>
:
:
Case Else 
    <Case Else statement within the block>]
End Select 

Parameters
<Expression>
The expression that controls branch processing (integer).
<Value>
The value that defines each Case item (integer).
<Case statement within the block>
The statement to be executed (statement) when the result of the <Expression> is equal to the <Value>.
<Case Else statement within the block>
The statement to be executed (statement) when the result of the <Expression> is not equal to the <Value>.

Return Value
None.

Description
Branching to each statement is done in accordance with the result of the <Expression>.
An integer value or a formula can be specified in the <Expression>.Processing will branch to the <Value> of Case that matches the result.
When no formula matches, processing branches to that defined by Case Else.
Multiple Case statements can be used.
The Case statement and Case Else statement can be omitted.
The End Select statement can be omitted.
When multiple expression results exist that match the Case statement <Value>, only the first Case statement from among them is executed.
Moving control from outside the Select block to the inside or moving control from inside it to the outside using statements such as the goto statement is not possible.

Example
Distribute the processing according to the judge result of latest unit.
RESULT&=UnitJudge(UnitNo-1)
Select RESULT&
Case 0
    Print "UnMeasured"
Case 1
    Print "Judge OK"
Case -1
    Print "Judge NG"
END SELECT