HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Chapter 4 147
Advanced Forms Design
SINGLE VALUE COMPARISONS
Numeric Comparisons
When numeric values are compared, they are first converted to the HP 3000 internal
representation of the number. Thus, a field of type IMPn can be compared with NUMn, and
NUMn or IMPn fields can be compared to type DIG fields. For example, assume a field of type
NUM 2 in which the value 123 has been entered. This value can be successfully compared to
the constant "123", or a field of type IMP, NUM,orDIG so long as the field contains the value
123 at run-time. For example:
123.000 (NUM3)
is equal
to 123 (DIG)
123.000 (NUM3)
is equal
to 12300 (IMP2)
Date Comparisons
Two dates may be compared even if they differ in format and order. This means that the
date February 9, 1986, specified in the current field as 9 FEB 1986 (DMY) can be
successfully matched against the constant ! 02/09/86! whose order is MDY. Remember: a
date constant must always be in the order MDY. For example:
2/3/86 (MDY)
is equal
to Feb 3, 1986 (MDY)
2/3/86 (MDY)
is equal
to 86/2/3 (YMD)
Example
EQ F3 The current field value must exactly match the value in F3 at run time.
(Any leading or trailing blanks are stripped from the value in both fields
before the comparison is made.)
GT 143.56 The current field value must be greater than 143.56
NE $TODAY A date entered in this field cannot be today's date.
GT "Cd" The current field may contain any value greater than Cd, such as D or Cde
but it cannot be C or CD. Note that in NATIVE-3000 all uppercase
characters have a lower value than any lowercase character.
GE !5/7/86! Any date including and after May 7, 1986 may be in current field. The
date may be in any of three formats: MDY, DMY, or YMD.
Native Language Support
NATIVE-3000 must be used to define values for date and numeric fields within
FORMSPEC. VPLUS will convert the value when the forms file is executed to be
consistent with the native language selected. Single value comparisons (GT, GE, LT, LE,
EQ, NE), specified within FORMSPEC may contain any character in the 8-bit extended
character set consistent with the selected language ID. When the form is executed, the
collating table for the native language specified is used. For more information on Native
Language Support, see Section 8.