Skip to content

THINK Pascal

Alan Canon edited this page Mar 3, 2017 · 7 revisions

THINK Pascal is a flavor of the Pascal programming language, with a compiler and integrated development environment, for the Classic Macintosh environment. It is source compatible with the earlier flavors of Pascal for the Classic Macintosh, Macintosh Pascal and MPW, but adds some features, including a console-type text window, and floating point number formatting support. THINK Pascal has an object-oriented flavor, but Dawkins did not use the object-oriented features of the language for the development of the Blind Watchmaker programs.

Dawkins' copy of THINK Pascal 4.0.1 included patches to bring the compiler up to version 4.0.2, the last official patch released by Symantec. Dawkins did not install the 4.0.2 patch, but doing so does no harm to the compilation of his original programs. A later unofficial patch to THINK Pascal, by Ingemar Ragnemalm, introduces the Universal Pascal Interfaces (UPI) change to the Macintosh Toolbox. This unofficial patched version is not used by the Blind Watchmaker project.

The Macintosh Pascal dialect of THINK Pascal is supported (in its non-object-oriented mode) by the modern Free Pascal compiler and is associated Lazarus IDE.

THINK Pascal source files can have an filename extension of .pas. The file type is TEXT, and the file creator is PJMM.

Data types and serialization

  • INTEGER Two bytes, equivalent to Java "short".
  • REAL IEEE 754 "single" floating point 4 bytes.
  • LONGINT Four bytes, equivalent to Java "int".
  • Enumerated Types (one byte each)