6.0 Chapter Goals

The purpose of this chapter is to elaborate on the module abstraction as a means of organizing programs. The library modules already used (STextIO, SRealIO, SWholeIO and RealMath) are explained in more detail, as will some of their variations. In addition, user-written library modules are covered. On completing the chapter, the student should understand and be able to use the following:

Data Representation Abstractions

General:

No new data types are taken up in chapter 6.

Realized in the Modula-2 notation:

Data Manipulation Abstractions

General:

entity encapsulation in libraries, I/O streams

Realized in the Modula-2 notation:

abstract data types encapsulated in modules, redirection of I/O

Programming Abstractions

General:

Top-down design and planning is further extended to the encapsulation of related entities in a library that can be imported from by any program.

Realized in the Modula-2 notation:

library modules

middle-of-loop tested repetition structure


Contents