qck.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
SELECT CASE Statement
  ◄Summary►  ◄Details►  ◄Example►                ◄Contents►  ◄Index►  ◄Back►
──────────────────────────────────────────────────────────────────────────────
 Executes one of several statement blocks, depending on the value of an
 expression.
 
    SELECT CASE testexpression
         CASE expressionlist-1
              [statementblock-1]
         [CASE expressionlist-2
              [statementblock-2]]
         [CASE expressionlist-n
              [statementblock-n]]
         [CASE ELSE
              [statementblock-n]]
    END SELECT
 
    ■ testexpression    Any numeric or string expression
 
    ■ expressionlist-1  Any of the following forms or a combination,
      ...               separated by commas:
      expressionlist-n
                            expression [,expression]...
                            expression TO expression
                            IS relational-operator expression
 
                            • expression           Any numeric or string
                                                   expression compatible
                                                   with testexpression
 
                            • relational-operator  One of the following
                                                   relational operators:
                                                   < <= > >= <> =
 
    ■ statementblock-1  One or more statements on one or more lines
      ...
      statementblock-n
 
 See Also
    ◄IF...END IF Statement►            ◄IF TYPEOF Statement►
    ◄Loops and Decision Structures►    ◄Relational Operators►