HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Chapter 4 173
Advanced Forms Design
IF
Table 4-10. Variations on the IF Statement
Variation Description
IF
condition
THEN
statement
Simple IF statement. If
condition
is true, then
statement
is executed; if false, then
statement
is not executed.
IF
condition
THEN
statement
statement
statement
If
condition
is true, all three
statements
are executed in
the order speciļ¬ed. If
condition
is false, none of the three
statements
is executed.
IF
condition
THEN
statementA
ELSE
statementB
If
condition
is true,
statementA
is executed; otherwise,
statementB
is executed.
IF
condition
THEN
statementA
statementB statementC
ELSE
statementD
The
statementA, statementB
and
statementC
are
executed if the
condition
is true;
statementD
is executed if
the
condition
is false,
IF
condition
THEN
statementA
statementB
statementC
ELSE
statementD
If condition is true,
statementA, statementB
, and
statementC
are executed; otherwise
statementD
is
executed.
IF
condition1
THEN
IF
condition2
THEN
statementA
statementB
ELSE
IF
condition3
statementC
statementD
ELSE
statementE
Only if
condition1, condition2
are both true,
statementA, statementB
are executed.
Only if
condition1, condition3
are true, but
condition2
is false, is
statementC
executed.
Only if
condition1
is true, regardless of whether
condition2, condition3
are true, is
statementD
executed.
Only if
condition1
is false, is
statementE
executed.