Select : EndSelect


Syntax
Select <expression1>
  Case <expression2> 
     ...
  [Case <expression3>]
     ...
  [Default] 
     ...
EndSelect 
Description
Select allows a quick choice. The program will execute the <expression1> and keep its value in memory. It will compare this value to all of the "Case <expression> values" and if true it will execute the corresponding code and quit the Select structure. If none of the Case values are true, then the Default code, (if specified), will be executed.

Example:

  a = 2
  Select a
    Case 1
      PrintN("Case a = 1")
    Case 2 
      PrintN("Case a = 2") 
    Case 20 
      PrintN("Case a = 20")
    Default
      PrintN("I don't know")
  EndSelect