Developing Apama Applications > EPL Reference > Statements > Compound statements > The if statement
The if statement
The if statement is used to conditionally execute a statement or block.
IfStatement
Rule components
The expression, whose result type must be boolean, is evaluated and if its result is true the block following the then keyword is executed. After the body of the then clause has been executed, control is transferred to the next statement following the if statement.
If the expression result is false, and an else clause is present, the statement or block following the else is executed. After the body of the else clause has been executed, control is transferred to the next statement following the if statement.
If the expression result is false, and the else clause is not present, control is transferred to the next statement following the if statement.
Copyright © 2013-2015 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.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.