Type in the words(s) to search for:

    Mark results
      Userbooster Help

      switch, case and default Statements

      Enables the execution of one or more statements when the value of the expression the value of the label.

        switch ( expression )
        {
        case label expression :
            statementlist
        case label expression :
            statementlist
        ...
        default :
            statementlist
        } 

      Arguments

      expression

      Expression to be evaluated.

      label expression

      Label expression to be matched against the expression.

      statementlist

      One or more statements to be executed.

      Remarks

      The default clause is used to provide the statement that should be executed if none of the label values matches the expression. You can use it anywhere within the switch code block.

      You can specify zero or more label blocks. If the value of the expression matches no value of the label expressions, and the default case is not supplied, no statements are executed.