case

The case keyword identifies a statement block in a switch statement.

Purpose

This keyword is used to identify a statement block in a switch ruleflow statement.

Context

switch statements

Syntax

switch (expression)
{
   case value1:
   {ruleflowStatement}
   ...
   case valuen:
   {ruleflowStatement}
   default:
   {ruleflowStatement}
}

Description

The switch statement is a conditional ruleflow statement. The integer expression is evaluated. If the value of a case block is equal to the evaluated expression, the corresponding statement block is executed. If no block with the requested value is found, the default block is executed.