A2-8 |
A subunit is compiled separately from its
logically-enclosing package. Therefore, it can be re-compiled or replaced by another
version with the same name, without having to modify or re-compile the enclosing unit and
other units that depend upon it. |
A2-7 |
Generic packages provide powerful support
for reuse. For example, a generic package can provide a "parameterized class of
objects" that can be instantiated in a number of useful ways, without having to
re-write the internal logic of the methods associated with the class. |
A2-6 |
ADT stands for "abstract data
type." An ADT package defines a data type in such a way that client modules can
create instances of the type and call its operations, but cannot gain access to the inner
workings as defined in the private part of the package specification or the package body. |
A2-5 |
A subprogram can be nested in a package in one
step, by simply including the subprogram body inside the package body. Alternatively, it
can be nested in two steps, by declaring the subprogram in the package declaration, and
then including the subprogram body inside the package body. The latter method makes the
subprogram available to clients of the package. |
A2-4 |
Typically, a compilation unit is some source text
that begins with one or more context clauses, followed by the text defining a library unit
body or library package declaration or separate subunit. If no context clauses are needed,
a compilation unit may be simply the text defining a library unit body or library package
declaration. |
A2-3 |
Withing relationships, parent/child relationships,
and nesting relationships are used to connect program units. |
A2-2 |
Only subprograms, packages, and generic
units can be library units. |
A2-1 |
The six kinds of program units are: subprograms
(procedures and functions), packages, generic units, tasking units, protected units, and
protected entries. |