Previous Topic Next topic Print topic


Factored Declarations

Factored declarations define two or more names having the same attributes. The recommended form of a factored declaration is:

DECLARE (name-1[,name-2]…)a⊂1 a⊂2…a⊂n;

where each name is declared to have all of the attributes a⊂1 through a⊂n. In factored declarations, the names must be enclosed in parentheses.

Examples:

DECLARE (A,B,C) FIXED BINARY(15);
DECLARE (P,Q) POINTER STATIC INITIAL(NULL); 
DECLARE (X,Y)(5) FLOAT DECIMAL(7);

The last example is equivalent to the following statement:

DECLARE (X,Y) DIMENSION(5) FLOAT DECIMAL(7);

The bounds must be the first attribute in an attribute list if they appear without the DIMENSION keyword.

Previous Topic Next topic Print topic