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


13.14 Freezing Rules

(1)
This clause defines a place in the program text where each declared entity becomes ``frozen.'' A use of an entity, such as a reference to it by name, or (for a type) an expression of the type, causes freezing of the entity in some contexts, as described below. The Legality Rules forbid certain kinds of uses of an entity in the region of text where it is frozen.
(2)
The freezing of an entity occurs at one or more places (freezing points) in the program text where the representation for the entity has to be fully determined. Each entity is frozen from its first freezing point to the end of the program text (given the ordering of compilation units defined in 10.1.4).
(3)
The end of a declarative_part, protected_body, or a declaration of a library package or generic library package, causes freezing of each entity declared within it, except for incomplete types. A noninstance body causes freezing of each entity declared before it within the same declarative_part.
(4)
A construct that (explicitly or implicitly) references an entity can cause the freezing of the entity, as defined by subsequent paragraphs. At the place where a construct causes freezing, each name, expression, or range within the construct causes freezing:
(5)
(6)
(7)
(8)
A static expression causes freezing where it occurs. A nonstatic expression causes freezing where it occurs, unless the expression is part of a default_expression, a default_name, or a per-object expression of a component's constraint, in which case, the freezing occurs later as part of another construct.
(9)
The following rules define which entities are frozen at the place where a construct causes freezing:
(10)
(11)
(12)
(13)
(14)
(15)
Legality Rules
(16)
The explicit declaration of a primitive subprogram of a tagged type shall occur before the type is frozen (see 3.9.2).
(17)
A type shall be completely defined before it is frozen (see 3.11.1 and 7.3).
(18)
The completion of a deferred constant declaration shall occur before the constant is frozen (see 7.4).
(19)
A representation item that directly specifies an aspect of an entity shall appear before the entity is frozen (see 13.1).


Prev | Up | ____ | 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