ENFORM Reference Manual
DECLARE Statement
Statements
4–8 058057 Tandem Computers Incorporated
DECLARE Statement The DECLARE statement allows you to define a user variable, user aggregate, or user
table. The syntax of the DECLARE statement is:
DECLARE
user-variable-name
user-table-name
"["
max-subscript
"]"
user-aggregate-name
(
formal-argument
)
=(
step-expression˚
[‚[
end-expression
]
[‚
initialize-constant
]])
[ INTERNAL
internal-format
]
[AS
display-format
]
[ HEADING
heading-string
]
,... [ ; ]
user-aggregate-name
,
user-variable-name
, or
user-table-name
is the name of the declared element. Names of user-defined elements should
conform to the rules described in Section 3.
" [ "
max-subscript
" ] "
is the number of occurrences for the user table; the maximum number allowed is
64. Max-subscript must be enclosed within brackets [ ]. Refer to Section 3 for a
discussion of subscripts.
formal-argument
is the name used to represent the actual argument of the user aggregate.
step-expression
is the operation to be performed for each record contributing to the user aggregate.
end-expression
is the operation to be performed after all qualifying records for the user aggregate
are processed by the step-expression.
initialize-constant
is the numeric literal that will be the starting value for the user aggregate.