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

146 Chapter4
Advanced Forms Design
SINGLE VALUE COMPARISONS
SINGLE VALUE COMPARISONS
Used to compare the field value against a single value.
Syntax
[{GT
LT
GE
LE
EQ
NE}
value
[“
message
”]]
Parameters
value
The value can be a field, constant, save field, or a numeric expression, or it
may be an index retrieve operand within parentheses. Refer to "Statement
Syntax" earlier in this section for details.
message
Specifies a custom error message.
Discussion
You may use these statements to compare the contents of the current field with a specified
value. Any field can be compared to the special comparison value $EMPTY that represents
the lowest value for any data type. The main rule governing these comparisons is that only
values of the same data type (character, numeric, or date) may be compared. The
comparison is performed from left to right after leading and trailing blanks have been
stripped from the field.
Character Comparisons
If the two values being compared are not the same length, the shorter is padded with
blanks on the right until it is the same length as the longer value. Then a comparison is
made.
In a character comparison, values are considered equal only if each character matches.
One value is less than another if, at the point of mismatch, one character is numerically
less than its counterpart. Collating sequence order is used to determine the numeric value
of a character. (Refer to Appendix C for the USASCII collating sequence; refer to the
Language Support Reference Manual for the collating sequences for all supported native
languages.) For example, for NATIVE-3000:
a is greater than A
A is greater than
AA is greater than A
A is greater than a
where represents a blank.