Select Case … EndSelect
| Action: | A
SELECT statement is an
efficient way to write a series of If-Endif
statements. |
| Syntax: | SELECT CASE expression statement1 .... CASE expression statement2 .... ENDSELECT |
| Remarks: |
A SELECT statement consists of one or more conditions (CASE)
each of which is followed by one or more statements that are executed only
if the condition evaluates to TRUE. The SELECT
statement is processed from top to bottom. If an expression evaluates to
TRUE, the statements immediately following it are executed, up to the next
CASE statement. Only one CASE
statement is executed, regardless of how many statements evaluate to TRUE. If expression does not contain any relational operators, the condition
is considered to be true if it is numeric and if it evaluates to a value
other than zero, or if it is alphanumeric and it evaluates to a string
containing at least one character. |
| See Also: |
If Else Endif,
IIF( ) |
| Examples: |
SELECT |