The SELECT statement lets you specify an expression, the possible values the expression may have, and a list of statements to be executed for each possible value. The END SELECT keywords terminate the SELECT block. Example SELECT ERR CASE 11 PRINT "End of File" RESUME 32767 CASE 131 PRINT "Record not found" RESUME 5000 CASE ELSE ON ERROR GOTO 0 END SELECT
1 – Syntax
SELECT exp1 case-clause . . . [ else-clause ] END SELECT case-clause: CASE case-item,... [ statement ]... case-item: { [ rel-op ] exp2 } { exp3 TO exp4 } else-clause: CASE ELSE [ statement ]...