IF ... THEN ... ELSE statement
- Last Updated: October 8, 2020
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
An IF...THEN...ELSE statement is used to execute one or more ABL statements, based upon a logical condition that evaluates to true.
Syntax
|
If the value of the condition following the IF keyword
is true, the AVM executes the statement or statements following the THEN keyword. If you want to execute multiple statements,
they must be contained in a DO block. A DO block begins with DO:
and ends with END. You can add an ELSE keyword to your IF THEN statement to
handle the false condition.
The following code example contains an IF THEN
ELSE statement:
|
Running the code produces the following output:
|