Previous topic | Ada Home Page | Index

Separate Compilation: Library Units

library unit

incorporated in other programs via "with"

usually packages; can be procedures (useful operations)

compilation order:

  1. library unit
  2. procedures that use it

Once a library unit has been compiled it is in the library for use by anything that needs it.

For example, standard I/O libraries for integers and floats can be compiled as library units. They are then available in the library, and do not need to be redefined in programs that use them. They can simply be incorporated into programs that need to use them by including a WITH statement at the start of those programs.

Another example shows how a useful procedure can be compiled as a library unit, and then used in another program.


Previous topic | Ada Home Page | Index
c-lokan@adfa.oz.au / 17 Feb 1996