HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
158 Chapter4
Advanced Forms Design
SET
SET
Used to move data either by setting the current field to a value or by moving data between
fields. Also performs automatic formatting.
Syntax
[SET {
destination
TO
source
destination
TO
source
}]
Parameters
source
Can be a field name, save field name, constant, arithmetic expression, or
an index retrieve operand within parenthesis.Refer to "Statement Syntax"
earlier in this section for details.
destination
Can be a field name or save field name.
Discussion
When data is moved between constants, fields, and save fields, certain restrictions apply
and certain conversions may take place. These depend entirely upon the data types of the
source and destination. In general, any field, save field, or constant can be converted to a
character type field, but numeric and date fields accept only data of a similar type. DIG
fields accept only positive sources. If a source is $EMPTY, the destination is set to all blanks.
Table 4-9. shows the conversion that is performed when data is moved between fields.
Assigning a Value to the Current Field
To set the current field to the value of another field, a save field, a constant, an arithmetic
expression, or a value in a list located through an index, use the following SET statement:
Syntax
SET [
fieldname
] TO source
Parameters
fieldname
The current field name (default).
source
Can be a field name, save field name, constant, arithmetic expression, or
an index retrieve operand within parenthesis.Refer to "Statement Syntax"
earlier in this section for details.
Discussion
In general, any source value can be moved to a character type field. Numeric and date
fields accept only data of similar type. If the field type is DIG, the source must be a positive