Apama 10.3.1 | Apama Documentation | Developing Apama Applications | EPL Reference | Statements | Compound statements | The if statement
 
The if statement
The if statement is used to conditionally execute a block of code. It checks whether a condition is true or false, that is, the result type must be boolean. The conditional statement may optionally be followed by the keyword then followed by a block of code.
If the condition result is true, the block is executed. After the body of the if has been executed, control is transferred to the next statement following the if statement.
If the condition 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 condition result is false and the else clause is not present, control is transferred to the next statement following the if statement.
For more information, see Defining conditional logic with the if statement.

Copyright © 2013-2019 | 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.