Compilation Units and the Scope of Objects
Following Pascal conventions, all objects in an EQUEL/Pascal program are local to the scope in which they are declared and are visible in any nested scopes unless hidden by an intermediate redeclaration.
Constant, label, type, and variable names are local to the closest enclosing Pascal compilation unit. EQUEL/Pascal compilation units include programs, modules, procedures, and functions. The objects visible in their scopes include objects that are visible in the parent scope, formal parameters (if applicable), and local declarations. As in Pascal, once the preprocessor has exited the scope, the variables are no longer visible and cannot be referenced.
Note that compilation units that use EQUEL statements must be declared to EQUEL. This is accomplished by preceding the unit's header and its begin and end statements with the ## mark.
EQUEL does not support Pascal inherited environments, except for the special case of the EQUEL environment. For more information, see
The Inherit Attribute.