Using VPLUS: An Introduction to Forms Design (32209-90004)
5-14
TOPIC: IF STATEMENT
The
condition
in an IF statement that determines which statements are
executed is always a simple edit statement. It may be preceded by a
field name to indicate the field to which the edit applies. If there is
no field name, the edit statement applies to the current field.
IF [
value
]
editstatement
THEN [
statement
]... [
statement
]...
[ELSE [
statement
]...]
[[
statement
]... ]
When the condition is executed, rather than causing the field to fail if
the edit is not true, it causes the ELSE part of the IF statement to be
executed. If there is no ELSE, then nothing happens. Should the edit
statement be true, then the statement (or statements) following THEN are
executed.
The statements following THEN or ELSE can be on the same line with these
key words or on the following lines. (There is no limit to the number of
statements in either part.) When statements are on lines following THEN
or ELSE, they
must
be indented. The word ELSE must be in the same column
(indented the same number of spaces) as its preceding IF. These
conventions allow you to nest IF statements.
Action
For a full discussion of the IF statement, refer to Section 4 of the
VPLUS/V Reference Manual
.