Oberon 07
Declarations and scope rules
- Every identifier occurring in a program must be introduced by a declaration, unless it is a predefined identifier.
- No identifier may denote more than one object within a given scope.
- The scope extends textually from the point of the declaration to the end of the block (procedure or module) to which the declaration belongs and hence to which the object is local.
In its declaration, an identifier in the module's scope may be followed by an export mark (*) to indicate that it be exported from its declaring module. In this case, the identifier may be used in other modules, if they import the declaring module. The identifier is then prefixed by the identifier designating its module (see Ch. 11). The prefix and the identifier are separated by a period and together are called a qualified identifier.