By Mohamad Wael

Posted :

A history of the pascal programming language

It was the fifties; computers were starting to be formalized, and research was being done. A question that needed answers, is how to make a computer execute instructions. At first dedicated electric circuits, and switches, were used to make computers execute a desired algorithm, the switches had to be set in a given way, for the computer to execute the procedure.

Later on, it was tiresome to do that in this way, so why not have instructions that computer would execute, without you having to set the electric circuitry manually, the instructions can be punched for example on punched cards, or whatever that can be read by a self-functioning circuitry, this meant instructions presented to the computer as zeros and ones. This is called machine code.

Can't we have something simpler a human might ask? Personally, I don't like thinking in terms of zeros and ones, aren't words better? And this gave birth to assembly, which basically is, instructions are words, and words have a series of zeros and ones associated with them, let us say the add instruction is associated with 101.

Better? Well, one of the problems of assembly language, is that it is machine oriented, so each hardware, had its own assembly language. Solution? A language which is independent of the underlying hardware, such a language is called a high-level language. A high-level language, can be translated to any assembly language, using a compiler for example, after that, it can be translated using an assembler, to a series of zeros and ones, or even, a compiler might translate a higher-level language, directly into machine language.

Multiple high level programing languages, took birth in the fifties, for example Fortran, Algol58 … Niklaus Wirth, was a guy who was part of the committee, that worked over the Algol programming language, but Algol never took off, because it was difficult to write a compiler for it, in other words, it was hard to have something, that would translate Algol into assembly language.

This being said, Niklaus Wirth decided to create pascal, which is based on Algol, but which did not have the Algol problems, so it should have a performant and easy to write compiler, it should not have unneeded features, it should be a structured language, and it should be a language that can be used for operating systems programming.

The first draft of the pascal programing language had birth in 1968. In 1970, the pascal language definition was published: The programming language pascal, alongside a working compiler. The compiler was written in pascal, and was hand translated into CDC computer code, so this gave birth to a working compiler, which can later compile itself, and other pascal programs, into CDC instructions.

In 1972, a revision of the pascal programing language was published: the programming language pascal (revised report), it served as the standard, for the programming language pascal, until 1983.

In 1973, a tutorial about the pascal programming language was published: Pascal User Manual and Report, by Kathleen Jensen.

Niklaus was not satisfied by the compiler at hand, to be used by students, as in for teaching purposes, hence he created Pascal-S, which is a subset of pascal, used for teaching introductory computer science courses, and a compiler was also created for Pascal-S. Pascal-S is defined in: Pascal-S: A subset and its implementation by Niklaus Wirth, 1975.

Back in 1973, the compiler at hand, was only capable of generating machine code for the CDC computers, Niklaus did not want to be confined to just one architecture, so to make pascal portable, instead of having a compiler generating code for a specific machine, work was done on a compiler, which generated a code for a virtual machine, and as such, the task was only to write an interpreter, for the generated code, for different machine architectures.

The virtual machine was called the P-machine, the generated code was called the P-code, and the compiler was called the P-compiler, and everything was called the P-System, or P-kit.

Multiple versions of the P-compiler were created, the earliest one was Pascal-P1 in 1973, followed by Pascal-P2 for the revised language pascal, Pascal-P3, and the last one to originate from ETH Zurich where Niklaus was a professor, was Pascal-P4 in 1976. After that the reign of maintenance was passed to the Minnesota group. The code generated by the Pascal-P4 compiler, was not backward compatible with Pascale-P3.

In 1976, and at the university of California at San Diego, the Pascal-P2 compiler was ported to the PDP-11 minicomputer, but it was not just the compiler, it was more like having an integrated development environment using pascal, this was called UCSD Pascal.

UCSD pascal was ported later on, to microcomputers, so it was usable on the apple II, the Z80, IBM pc … and it had extensions to the language, such as file handling, variable length strings, compilation units, so there was a need to standardize the language.

In 1983, Pascal was standardized in ISO 7185, it was the same as the 1972 revised pascal, with some corrections and clarifications, so there was no addition to the language, besides dynamic arrays. ISO 7185:1990 was released in 1990, and it corrected some ambiguities in ISO 7185.

Pascal was also standardized, by the American National Standards Institute, as ANSI/IEEE770X3.97-1983, the standardization was identical to ISO 7185, but without the dynamic arrays addition.

In 1990, ISO 10206 defined extended pascal, which added modularity to pascal, complex numbers and other things.

In 1986, object pascal was developed by apple, with the help of Niklaus Wirth, it allowed object-oriented programming into Pascal, and was influenced by UCSD pascal. Object pascal was never standardized.

Borland created turbo pascal in 1983. Turbo pascal was influenced by UCSD pascal, and starting version 5.5, which was created around 1989, turbo pascal had support for an extended version of object pascal.

Later on, Borland pascal, also referred to pascal with objects, gave birth to Delphi in 1995, Delphi had some major changes from turbo object pascal,

Microsoft released Microsoft pascal in 1980, it was ISO compliant. Later on, they wanted to compete with Borland turbo pascal, as such in 1989, QuickPascal was released. QuickPascal was compatible with Borland turbo pascal, aside from object-oriented programming.

The free pascal compiler was released in 1997, it is compatible with turbo and Delphi pascal, and it is still being actively developed.

GNU pascal is a compiler compatible with ISO pascal, but it is not being actively developed anymore, and its last release date, was in 2005.