12.4.4 Unit scope

All identiers in the interface part of a unit are valid from the point of declaration, until the end of the unit. Furthermore, the identiers are known in programs or units that have the unit in their uses clause. Identiers from indirectly dependent units are not available. Identiers declared in the implementation part of a unit are valid from the point of declaration to the end of the unit. The system unit is automatically used in all units and programs. It's identiers are therefore always known, in each pascal program, library or unit. The rules of unit scope imply that an identier of a unit can be redened. To have access to an identier of another unit that was redeclared in the current unit, precede it with that other units name, as in the following example:

unit unitA;  
interface  
Type  
  MyType = Real;  
implementation  
end.  
Program prog;  
Uses UnitA;  
 
{ Redeclaration of MyType}  
Type MyType = Integer;  
Var A : Mytype;      { Will be Integer }  
    B : UnitA.MyType { Will be real }  
begin  
end.

This is especially useful when redeclaring the system unit's identiers.