Ada Reference ManualLegal Information
Contents   Index   References   Search   Previous   Next 

8.5.3 Package Renaming Declarations

1
A package_renaming_declaration is used to rename a package. 

Syntax

2
package_renaming_declaration ::= package defining_program_unit_name renames package_name;

Legality Rules

3
The renamed entity shall be a package.
3.1/2
 If the package_name of a package_renaming_declaration denotes a limited view of a package P, then a name that denotes the package_renaming_declaration shall occur only within the immediate scope of the renaming or the scope of a with_clause that mentions the package P or, if P is a nested package, the innermost library package enclosing P

Static Semantics

4
A package_renaming_declaration declares a new view of the renamed package.
4.1/2
 At places where the declaration of the limited view of the renamed package is visible, a name that denotes the package_renaming_declaration denotes a limited view of the package (see 10.1.1).

Examples

5
Example of renaming a package: 
6
package TM renames Table_Manager;

Contents   Index   References   Search   Previous   Next 
Ada-Europe Sponsored by Ada-Europe