- A renaming_declaration declares another name for an entity, such as an
object, exception, package, subprogram, entry, or generic unit.
Alternatively, a subprogram_renaming_declaration can be the completion of a
- The elaboration of a renaming_declaration evaluates the name that follows
the reserved word renames and thereby determines the view and entity denoted
by this name (the renamed view and renamed entity). A name that denotes the
renaming_declaration denotes (a new view of) the renamed entity.
(8) Renaming may be used to resolve name conflicts and to act as a
shorthand. Renaming with a different identifier or operator_symbol does
not hide the old name; the new name and the old name need not be visible
at the same places.
(9) A task or protected object that is declared by an explicit object_declaration can be renamed as an object. However, a single task or
protected object cannot be renamed since the corresponding type is
anonymous (meaning it has no nameable subtypes). For similar reasons,
an object of an anonymous array or access type cannot be renamed.
(10) A subtype defined without any additional constraint can be used to
achieve the effect of renaming another subtype (including a task or
protected subtype) as in
subtype Mode is Ada.Text_IO.File_Mode;
- Object Renaming Declarations
- Exception Renaming Declarations
- Package Renaming Declarations
- Subprogram Renaming Declarations
- Generic Renaming Declarations
-- Email comments, additions, corrections, gripes, kudos, etc. to:
Magnus Kempe -- Magnus.Kempe@di.epfl.ch
Page last generated: 95-03-12