| |||
Declarations assign attributes to identifiers. All variables must be declared prior to use.
The XPL program and any procedure definitions are called blocks. Procedure definitions
may nest within the program block or other procedures to any depth. The scope of a
declaration is the block where the declaration occurs and any nested blocks that do not contain
another declaration for the same identifier.
XPL allows only one-dimensional arrays. All subscripts start at zero. Initial values, specified by the initial attribute are set once at load-time and not at entry to the block containing the declaration. The literally attribute is used to declare a simple parameterless macro. Any occurrence of the declared identifier following the declaration will be literally replaced during compilation by the character string following literally. Example: declare n literally '5'; declare arr(n)fixed; Results in the declaration of arr as an array of five elements. |