User Variables
ENFORM Language Elements
058057 Tandem Computers Incorporated
3–31
When assignment syntax is used, ENFORM reassigns a value to the user variable for
each target-record; therefore, the value of the user variable might be different for each
target-record. For example:
LIST u-var, u-var := salesman;
ENFORM uses the default or initial value for the first occurrence of u-var in every
target-record. For the second occurrence of u-var ENFORM uses the value of the
salesman field. This value changes for every target-record.
A user variable can be assigned the value of an expression that contains the user
variable. For example:
DECLARE u-var;
SET u-var TO 10;
OPEN parts;
LIST partname,
u-var:= (u-var + 10);
ENFORM uses the initial or default value of the user variable to determine the value of
the expression. In the example the value of the expression is 20. ENFORM then
assigns this value to the user variable. Within the same LIST statement, assignment
syntax can subsequently be used to assign the user variable to another expression
containing the user variable. For example:
DECLARE u-var;
SET u-var TO 10;
OPEN parts;
LIST partname,
u-var:= (u-var +10),
u-var:= (u-var +20);
ENFORM uses 20, the value assigned in the first assignment syntax (u-var + 10) for the
value of u-var in the second expression. After determining the value of the expression
(u-var +10) +20)), ENFORM assigns the value of the expression (40) to the user
variable.
ENFORM performs this process for every target-record. ENFORM continues the
process of re-evaluating the value of a user variable until it encounters the end of the
target-list.
Summary of Contents for ENFORM 058057
Page 6: ...New and Changed Information 058057 Tandem Computers Incorporated v...
Page 18: ...Preface xvi 058057 Tandem Computers Incorporated This page left intentionally blank...
Page 19: ...Preface 058057 Tandem Computers Incorporated xvii...
Page 269: ...Glossary Glossary 4 058057 Tandem Computers Incorporated This page left intentionally blank...