The Waterloo Pascal Compiler
The Waterloo Pascal compiler is a debugging-oriented, "load-and-go"
compiler designed for use in multi-user timesharing environments. It
features a complete implementation of ANSI/IEEE 777X3.97-1983 standard
Pascal, as well as several extensions to the language.
Since Waterloo Pascal is primarily a "debugging" compiler, it is
most applicable in environments where undebugged programs are to be
turned into working programs. Such a compiler has a particular set of
- a fast compilation rate;
- a comprehensive set of readily-understandable compile-time
diagnostics in full English text (as opposed to error codes or numbers);
- a run-time environment that ensures that all run-time violations
are detected and meaningfully diagnosed; and
- facilities which enable the user to debug programs quickly and
Waterloo Pascal is equally useful as a teaching tool in classroom
situations, or as a "checkout" compiler in industry.
- The language accepted by Waterloo Pascal is the full ANSI standard
Pascal (which is equivalent to ISO Level 0 Pascal), plus the extensions
- An integral part of Waterloo Pascal is an interactive debugger
which may be used to monitor the execution of a program, or to perform a
post-mortem examination of the program state after an execution-time
- The run-time diagnostics detect such errors as: attempts to use
uninitialized variables; incorrect use of subrange values; array
subscripting errors; attempts to use nil pointer values or
previously "disposed" memory; variant record semantics; and control
- In the event of a run-time error, Waterloo Pascal issues an error
message stating at which line in the source program the error occurred,
the name of any variables involved in the error, plus a
procedure/function activation traceback, with a display of the scalar
and string variables at each level.
- The compiler contains safeguards against "run-away" programs. Each
installation may tailor this support to its own needs.
- The compiler produces two output files: a listing file and a
diagnostics file. The listing file contains a list of the source
program statements, plus the program output (the Pascal standard output
file). If there were any compile-time errors, the error messages are
inserted into the source listing at the appropriate place. The
diagnostics file contains a summary of all diagnostic messages, plus a
log of all interactive debugger output (if applicable).
Extensions to Pascal
- The Waterloo Pascal string extension consists of several new
procedures and functions, combined with modifications to the
type-compatibility rules in Pascal. The extension allows
variable-length string data to be manipulated conveniently.
- The multiple concurrent process extension permits the simulation of
multiprocessing directly in Pascal. The extension employs a
message-passing abstraction (using Start, Send, Receive and Reply)
similar to the one used in several real-time operating systems.
- The standard procedures reset and rewrite are
extended to permit the specification of a system-dependent filename.
- There are numerous minor extensions to the Pascal language,
including: extensions to the character set to accommodate systems on
which the character set may not contain all required characters;
additional general-purpose standard functions and procedures such as arcsin,
arccos, arctan2, tan, RtoS ("Real to String") and StoR
("String to Real"); and the non-interactive debugging procedures TraceOn
The Waterloo Pascal Primer and Reference (Boswell, Grove and
Mackie; ISBN 0-919884-45-8; WATCOM Publications Ltd., 1984) is the
primary reference for the Waterloo Pascal compiler. In addition to
being a reference manual, this book may also be used as a
self-instruction manual or a course textbook. Each of the chapters in
the Primer introduces a new topic in Pascal, and contains many examples
Copies of this book may be purchased from WATCOM Publications Ltd.
at the address shown below.
The Waterloo Pascal compiler is available in the following
- IBM 370 architecture machines, under the VM/SP CMS and MVS
(including TSO) operating systems