Section 2.5 - Review of Basic Ada Structures

Let's briefly review what we've learned so far:
  1. Logically, Ada programs are composed of a set of program units.
  2. There are different kinds of program units; the ones we've concentrated on are subprograms and packages.
  3. Subprograms define processing algorithms. Subprograms can be procedures or functions.
  4. Packages are the main Ada structuring tool used to group things together.
  5. In general, a program unit has two parts, a declaration and a body. Sometimes a declaration is also called a specification.
  6. Ada compilers compile compilation units. A compilation unit is either a program unit's declaration or body, preceded by a context clause.
  7. A context clause is a set of with clauses (that state what other program units are needed) and/or use clauses (the program units to search by default).


Given what you know now, is it possible for an Ada compiler to compile a package declaration (when preceded by the appropriate context clauses), even if implementation details are needed and the package body has not been developed yet?

  1. Yes
  2. No

You may also:

PREVIOUS Go back to the previous section

NEXT     Skip to the next section

OUTLINE  Go up to lesson 2 outline

David A. Wheeler (

The master copy of this file is at "".