Retro? Necro? Oh yes, Turbo!

Posted byon January 25, 2010

Most people who write about Turbo Pascal start with their memorials about its appearance and their experience with it. I can't pattern them, since Turbo Pascal 1.0 is exactly two years older than I am, so I used only 7.0 version, followed by Delphi.

I'll have to approach this topic from opposite direction and tell you how Turbo Pascal looks from the modern point of view, for a person who was raised on modern IDEs and turns to Turbo Pascal with purely exploratory purposes.

So, let's have a look at year 1983 and Turbo Pascal 1.0...



Turbo Pascal 1.0

1. Installation

TP 1.0, as well as next versions up to 4.0 inclusive, is installed by simple copying to hard drive. It can be used without installation at all, if unzipped distribution is stored on a floppy disk. Directory in which the compiler is stored is considered to be working directory. Versions 1.0 - 3.0 don't use libraries, so "installation" takes exactly one operation. It is possible to tune screen parameters and editor commands separately, but this is not required for work.

Turbo Pascal 4.0 introduced the concept of program units, i.e., libraries which could be compiled separately and used later. Thus it provided means to change working directory and directory of included libraries. By the way, most versions of TP are created for DOS (except for versions up to 3.0 which had CP/M editions), so they support only "8.3" format for naming files and directories. This is one of those things which are known theoretically but come as a surprise when you encounter them practically.

Versions 5.5 and later present install.exe utility which allows to automate installation process, including setting directories.

2. Distribution

TP 1.0 distribution takes 131 Kb and can be stored on one 5' floppy disk (well, if you have one). It has nothing superfluous: user manual is provided as a separate paper book, so the distribution contains only file error.doc, which lists only short "Getting started" and FAQ sections and several corrections to paper manual. By the way, this is where one more pattern of modern programmer is inapplicable: .doc is NOT MS Word file but a text file with certain document, as well as .hlp is NOT a specialized help file in corresponding format but a text file with certain help.

Each following version of TP its distribution increases both in size and in quantity and variety of its files.

Version Date appeared Size, Kb Number of files Number of examples Size of compiled "Hello, World!" program, bytes 1.0 20 Nov 1983 131 10 1 8805 (com) 2.0 17 Apr 1984 164 18 5 10078 (com) 3.0 17 Sep 1986 335 31 14 11412 (com) 4.0 02 Nov 1987 980 69 24 1968 (exe) 5.0 1988 1 270 26 0 1840 (exe) 5.5 02 May 1989 1 680 119 54 1840 (exe) 6.0 04 Oct 1990 2 880 172 84 1934 (exe) 7.0 09 Mar 1993 23 383 532 - 2208 (exe)

Since version 5.5 distribution structure changed: now it contains a limited set of necessary files (the compiler itself) and several archives with optional add-ins: descriptions of language and IDE, utilities, set of examples etc. The table lists sizes of fully installed IDEs.

3. IDE

In TP 1.0 (as well as in TP 2.0 and TP 3.0 ) the environment is organized as text-based menu, with commands chosen by pressing hot keys.



Turbo Pascal 2.0



Turbo Pascal 3.0

In edit mode the edited file is opened separately, and program compilation and execution become possible only after the programmer returns from edit mode back to main menu. This allows to run all development cycle while staying within the IDE (and combining files editor, compiler and linker in one IDE was a great news at that time), but looks quite unusual for modern programmer.

Thus, for example, one can't edit two files in row without quitting the IDE, not to mention editing several files simultaneously. Though for a brand-new project that consists of one file changing the work file is more of luxury than of necessity.

The editor itself is uncommon as well. All commands are given using combinations of several keys (same as hot keys in modern editors), but keys combinations are based on commands of WordStar editor, which differ from modern default values drastically. Thus, for example, one can enter edit mode simply by pressing "E" and entering the name of wanted file, but quitting from edit mode to main menu is much trickier. I've tried lots of commands from modern "default", but to find out the correct Ctrl-K-D I had to find the manual.

By the way, Borland has released free of charge as antique software (http://community.borland.com/museum/) only versions 1.0, 3.0 and 5.5 themselves but not manuals for them. The manuals were to be purchased as paper books along with the distribution, so they acted as a kind of protection against unauthorized copying. That's why I found only scanned manual for 3.0 version, which is pretty similar to 1.0.

Till version 3.0 appearance and capabilities of the IDE stayed nearly the same, but then...



Turbo Pascal 4.0

Turbo Pascal 4.0 is the first version to provide a full-screen editor interface with drop-down menu on the top and output and the list of hot keys at the bottom of the screen. Menu commands can be accessed without hot keys, using only cursor control buttons. Since this version programs started compiling to .exe files instead of .com ones.



Turbo Pascal 5.0

Next version was Turbo Pascal 5.0, which is sometimes forgotten and omitted from the version list, though it was the first one to provide built-in debugger.



Turbo Pascal 5.5

Turbo Pascal 5.5 introduces the customary blue interface, distinctive for all later Turbo products. This version provides next major improvement of the series - support for object-oriented programming.

In Turbo Pascal 6.0 the IDE is expanded with next feature - mouse support. Besides, it provides Turbo Vision - a library for developing applications with complicated visual interface, which was the beginning of evolution of modern GUI development systems.

Syntax highlight (it's hard to imagine a modern IDE without it) appears as late as Turbo Pascal 7.0, which was shipped as part of Borland Pascal 7.0 or separately.



Turbo Pascal 7.0

One more difference between early versions of Turbo Pascal and modern IDEs is the limited debugging capabilities of the environment. If there are errors in the code, TP 1.0 notifies the programmer about the first error (and its nature, if one doesn't save on memory and uploads error texts) and forwards him on the erroneous line in edit mode. That's all. One compile fixes one error, not to mention step-by-step debug (which appears only in 5.0). However, this is an arguable flaw, since some errors are generated by earlier ones, so with fast enough compiler (and TP is fast) it's better to fix one error and recompile than to follow each error at the same time.

4. Created projects

The part I really liked about TP series (unlike most modern IDEs) is the minimalism of created projects, which lasts till the last version. 1 project = 1 source code file + 1 executable file (.com or .exe). Personally I feel annoyed with the quantity of directories and files created by, say, Visual Studio for a simple console application ("Hello, World!" in C++ takes 22 files and 3 subdirectories).

blog comments powered by Disqus