Apama 10.3 | Apama Documentation | Developing Apama Applications | EPL Reference | Statements | Compound statements | The switch statement
The switch statement
The switch statement is used to conditionally execute a block of code. Unlike the if and if ... else statements, the switch statement can have a number of possible execution paths.
The switch statement names the expression as an identifier with the as keyword followed by an identifier to name the value. In each case clause block, the identifier has the same type as the case clause.
If the expression is a simple identifier (that is, it is referring to a variable or parameter), then the as Identifier part can be omitted. The new local retains the same name.
For more details, see Handling any values of different types with the switch statement.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.