Site hosted by Angelfire.com: Build your free website today!
NAME
  SELECT CASE Statement

SYNOPSIS
  SELECT CASE testexpression
  CASE expressionlist1
    [statementblock-1]
  [CASE expressionlist2
    [statementblock-2]]...
  [CASE ELSE
    [statementblock-n]]
  END SELECT
      o testexpression      Any numeric or string expression.
      o expressionlist1     One or more expressions to match testexpression.
        expressionlist2     The IS keyword must precede any relational operators
                            in an expression.
      o statementblock-1    One or more statements on one or more lines.
        statementblock-2
        statementblock-n
      o The expressionlist arguments can have any of these forms or a
        combination of them, separated by commas:
        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:
                                     <, <=, >, >=, <>, or =.

DESCRIPTION
  Executes one of several statement blocks depending on the value of an
  expression.

  Example:
      INPUT "Enter acceptable level of risk (1-5): ", Total
      SELECT CASE Total
          CASE IS >= 5
              PRINT "Maximum risk and potential return."
              PRINT "Choose stock investment plan."
          CASE 2 TO 4
              PRINT "Moderate to high risk and potential return."
              PRINT "Choose mutual fund or corporate bonds."
          CASE 1
              PRINT "No risk, low return."
              PRINT "Choose IRA."
      END SELECT

SEE ALSO
  IF...THEN...ELSE