HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)

Chapter 4 171
Advanced Forms Design
IF
IF
Used to execute any of the processing statements only under certain conditions.
Syntax
[IF
condition
THEN [
statement
]
[
statement
]
.
.
.
[
statement
]
[ELSE [
statement
]
[
statement
].
.
.
[
statement
]]]
where
condition
is:
[{
constant
field
save field
expression
(indexretrieve)
}
editstatement
]
Parameters
condition
A condition specified in an IF statement can be any edit statement
described below. The edit statement can be preceded by a constant, a field
name, a save field name, an expression, or an index retrieve operand
within parentheses. Refer to "Statement Syntax" earlier in this section for
details. If an operand precedes the edit statement, that value is tested;
otherwise, the value of the current field is tested.
If editing statement passes, then the condition is true. If it does not, then
the condition is false. Note that this differs from interpretation of a
standalone edit statement, which causes the field to return an error and
stops field processing if the data fails the edit. Only edit statements can be
used in conditions.
editstatement
A condition specified in an IF statement can be any edit statement
MATCH and CDIGIT
statement
Any of the processing statements can be executed conditionally depending
an the run-time interpretation of the specified condition. Refer to the
syntax rules below.