This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== SELECT CASE ====== SELECT CASE var CASE const1 [, const2..const3 [, expr ] ] . . . DEFAULT (or CASE ELSE) END SELECT The SELECT CASE construct allows you to organize multiple execution paths into a clean, easy to read format. Each CASE contains one or more expressions delimited by commas. Each CASE expression is compared to the SELECT CASE expression logically. If it is TRUE the body of the CASE is executed. The CASE body can contain as many statements as needed, including function calls. Note that ranges include the boundry values. eg 11..35 includes 11 and 35. The DEFAULT case will be executed when none of the other CASE expressions evaluate to TRUE. For BASIC programmers, the CASE ELSE is also valid instead of DEFAULT. **Example:** INTEGER i LET i = 3 SELECT CASE (i) CASE 1 PRINTLN "i = 1" proc1(i) CASE 2,6,10 PRINTLN "i is 2,6 or 10" proc2(i) CASE 3 PRINTLN "i is 3" CASE 11..35 PRINTLN "i is between 11 and 35" CASE 50..60,64,78 PRINTLN "I is between 50 and 60 or 64 or 78 DEFAULT PRINTLN "i is not a valid value" END SELECT