Next: Scope example
Up: More on Procedures
Previous: Modules Hosting Procedures
  Contents
The scope of an entity is the range of a program within which
the entity is visible and accesible.
- Local scope: the entity is visible within the program
unit in which it is defined.
- When the declaring program CONTAINS functions
(and/or subroutines), the declared entity can be made available
to the hosted procedures via
- Host association: An entity defined in a program unit is
visible within all procedures contained
in that program unit.
- Argument association. An entity defined in a program unit is
made available to a contained function or subroutine
by being passed as argument.
- Global scope: the entity has to be declared
in a module; then it is visible in each program unit
which USEs that module.
Adrian Sandu
2001-08-26