Prev | Up | Next | Back | Forward
TOC -- / --.-- / --.--.-- | Index | Search | Syntax | Help


10.1.2 Context Clauses - With Clauses

(1)
A context_clause is used to specify the library_items whose names are needed within a compilation unit.
Syntax
(2)
       context_clause ::= {context_item}
(3)
       context_item ::= with_clause | use_clause
(4)
       with_clause ::= with library_unit_name {, library_unit_name};
Name Resolution Rules
(5)
The scope of a with_clause that appears on a library_unit_declaration or library_unit_renaming_declaration consists of the entire declarative region of the declaration, which includes all children and subunits. The scope of a with_clause that appears on a body consists of the body, which includes all subunits.
(6)
A library_item is mentioned in a with_clause if it is denoted by a library_unit_name or a prefix in the with_clause.
(7)
Outside its own declarative region, the declaration or renaming of a library unit can be visible only within the scope of a with_clause that mentions it. The visibility of the declaration or renaming of a library unit otherwise follows from its placement in the environment.
Legality Rules
(8)
If a with_clause of a given compilation_unit mentions a private child of some library unit, then the given compilation_unit shall be either the declaration of a private descendant of that library unit or the body or subunit of a (public or private) descendant of that library unit.

(9)

Prev | Up | Next | Back | Forward
TOC -- / --.-- / --.--.-- | Index | Search | Syntax | Help

Ada WWW Home -- Email comments, additions, corrections, gripes, kudos, etc. to:

Magnus Kempe -- Magnus.Kempe@di.epfl.ch
Copyright statement
Page last generated: 95-03-12