Using VPLUS: An Introduction to Forms Design (32209-90004)
4-9
Figure 4-5. Field Menu for QTY in the ORDER Form
Single value comparisons can also be used for other fields of the form.
If you want to ensure that the number of parts ordered is one or more,
you use the GE statement to test that the data entered is greater than or
equal to one.
Action
Use NEXT to display Field Menus until the Field Menu for QTY is
displayed. Press FIELD TOGGLE. Type GE 1 in the lower menu, as shown in
Figure 4-5. Press ENTER.
Note that the data type of the QTY field was set to DIG in a prior
exercise. (Section 3). It could be any other numeric type, but not a
CHAR type or one of the date types.
Topic: Statement Syntax
Now that you have entered some edit statements and looked at examples of
others, you should be getting familiar with their format. Basically,
there is the statement name followed by some sort of value or pattern.
This basic format of the FORMSPEC edit statements is shown in the syntax
diagram below. Notice that you also have the option of specifying a
custom error message (
errormsg
) with an edit statement. Before you
finish entering the edit statements used in this exercise, read the
following discussion of the value, pattern, and error message parameters
used with FORMSPEC edit statements.