CASE

Top  Previous  Next

Syntax

CASE value

Description

A test condition for a SELECT statement.

Parameters

value - value to compare with the SELECT parameter.

Return value

None

Remarks

If the value in the select statement and the value in the CASE statement are equal then the statements immediately after this CASE will execute. CASE statements are non inclusive. To include more than one CASE for a group of statements see the CASE& statement.

See Also: CASE&, DEFAULT, SELECT, ENDSELECT

Example usage

A = 1
SELECT A
     CASE 1
           PRINT "TRUE!"
     CASE 2
           PRINT "You wont see this text"
     DEFAULT
           PRINT "None of the above"
ENDSELECT