Go to the first, previous, next, last section, table of contents.
-
A subprogram is the basic unit for expressing an algorithm. There are
two kinds of subprograms: procedures and functions. A procedure is the
means of invoking a series of actions. For example, it may read data,
update variables, or produce some output. It may have parameters, to
provide a controlled means of passing information between the procedure
and the point of call. A function is the means of invoking the
computation of a value. It is similar to a procedure, but in addition
will return a result.
-
A package is the basic unit for defining a collection of logically
related entities. For example, a package can be used to define a set of
type declarations and associated operations. Portions of a package can
be hidden from the user, thus allowing access only to the logical
properties expressed by the package specification.
-
Subprogram and package units may be compiled separately and arranged in
hierarchies of parent and child units giving fine control over
visibility of the logical properties and their detailed implementation.
-
A task unit is the basic unit for defining a task whose sequence of
actions may be executed concurrently with those of other tasks. Such
tasks may be implemented on multicomputers, multiprocessors, or with
interleaved execution on a single processor. A task unit may define
either a single executing task or a task type permitting the creation of
any number of similar tasks.
-
A protected unit is the basic unit for defining protected operations for
the coordinated use of data shared between tasks. Simple mutual
exclusion is provided automatically, and more elaborate sharing
protocols can be defined. A protected operation can either be a
subprogram or an entry. A protected entry specifies a Boolean expression
(an entry barrier) that must be true before the body of the entry is
executed. A protected unit may define a single protected object or a
protected type permitting the creation of several similar objects.
Go to the first, previous, next, last section, table of contents.