SELECT [expression] WHEN expression THEN instruction WHEN expression THEN instruction ... [OTHERWISE instructions] END [SELECT] If an expression is supplied after SELECT, then this construction is like a Pascal or Modula `CASE' construction. The expression is compared with each of the other expressions in turn, until one is found that matches (using the `=' form of equality). If a match is found, then the corresponding instruction is executed. If a match is not found, then an OTHERWISE clause must be specified, or else an error is reported. The instructions after OTHERWISE will be executed. If an expression is not specified after SELECT, then the construction is a list of guarded commands - that is, each expression is evaluated until a true one is found, and the corresponding action is taken. Again, if no expression is true and there is no OTHERWISE then an error is reported. The word SELECT may be placed after the closing END but is optional. Adding the word SELECT allows easier detection of missing ENDs. It is an error for the word WHEN or OTHERWISE to appear anywhere except immediately inside a SELECT construction. Precisely one instruction is required after each WHEN, so NOP should be used if no action is required. NOP need not be used after OTHERWISE. If multiple instructions are required to follow each WHEN condition, then they should be contained in a DO ... END block. Multiple instructions may follow the OTHERWISE keyword. LOCAL: The optional expression following the SELECT keyword, and the optional SELECT following the END keyword are features of PL/1 and not of standard REXX.