Libraries
Programs having the Library program type are not compiled when
you select All or Changed programs in the Program Compiler. They
are simply collections of procedures and are not executable. The
arrangement of the procedures within a library program has no
significance.
A Library program is useful if you want to do any of the
following:
- Start with the lowest-level procedures and construct your
program using a bottom upwards method
- Keep all similar procedures together for ease of editing or to
help you to identify suitable procedures or bodies for use
elsewhere
- Overcome or avoid the error Too many procedures in program.
This error is encountered long before the program is too big to
compile. By putting some procedures into a library and tying them
there, you reduce the number of procedures that are simultaneously
available for editing. The tied procedures are edited from within
their library
- Merge an overlay into the main
program. Change the overlay program to type Library leaving it
otherwise unchanged, because it will now be unnecessary to compile
it separately
- Tie the procedures "owned" by a particular member of a
development team to warn other members not to edit these
procedures. You cannot prevent them from doing so, but tying will
minimise the risk of accidental changes
It is helpful to decide on some naming conventions before
writing any programs, especially if the application could
eventually be a large one. It is very difficult to locate a
particular procedure or body in the list unless you know
approximately where it must appear.
A 2 or 3 letter prefix can act as a reference to a particular
library, so that you can quickly find where to view or edit a
procedure.