We now turn to illustrating how classes appear in the various different object-oriented languages we will consider in this book. We consider first Object Pascal, which is a variant of the Pascal language originally defined by Niklaus Wirth. Object Pascal was created by a research team at Apple Computer, and was for many years the language of choice for programming on the Macintosh. It it unfortunately now little used. However, a variant, Delphi Pascal, has recently become popular on the PC.
In Apple Object Pascal the module facility is based around the concept of the unit, which is the mechanism for creating modules in Pascal. A unit is contained in a file, and is divided into interface and implementation portions. Within each portion of the unit the const, type and var sections familiar to Pascal programmers can be written.