From Wikiversity
Jump to navigation Jump to search

Pascal is a programming language invented by Professor Niklaus Wirth (NICK-louse VEERt, by name, NICK-o-lus WIRth, by value) in response to his experiences in the development of Algol. As part of the Algol committee, Wirth was tasked to update Algol60 to incorporate the latest programming constructs, however, Wirth felt that the resulting language, Algol-W, was needlessly complicated and hard to implement. He later designed Pascal to be what he felt Algol-W should have been, and with an eye to teaching programming constructs.

Pascal was one of the earliest programming languages defined by it's abstract virtual machine. The earliest compilers took Pascal source to machine code, but a portable version of the compiler which compiled code for the virtual "P" machine (p-code) became the standard for porting Pascal to many new computers. Each required only an interpreter for the p-code machine to be written in some native language to allow Pascal to run "natively".

The p-code system was adopted and expanded at UCSD (University of California at San Diego) by a team put together and led by Ken Bowles. He added a method of modularizing compilation units to the system, among other improvements. This was released to the world as UCSD Pascal. Regretfully, USCD tried to turn it into a commercial product selling licenses to the system to Apple, among others. Apple introduced version II of UCSD Pascal as "Apple Pascal". This compiler went on to form the basic chassis of "Clascal", Apple's object-oriented Pascal which was the basis of much early Mac development.

Version III of UCSD Pascal was developed use on a system using p-codes as its native architecture - this was the same chipset as the LSI-11, a PDP-11 chipset, re-microcoded to directly execute P-codes. Curiously, it has been reported that the LSI-11 running a p-code interpreter was actually faster in some benchmarks than the same chipset running the microcoded interpreter.

SoftTech Microsystems eventually wound up buying UCSD Pascal, including the rights to the name. They marketed version IV of the system under the name UCSD P-System - the name change reflecting the fact that the Pascal compiler now had companion Fortran and Basic compilers. The system was badly overpriced and did poorly, it was eventually bought by another company which marketed it as "Pecan Software", was then acquired by a British company which euthanized it.

Pascal has often been observed to be an improvement on many of its successors as well as its predecessors. It's strong typing system allowed the compiler to detect and report many errors at compile-time that would otherwise have meant lengthy sessions with a debugger. This feature was under-appreciated at the time, most software development switching to C. While C compiler's did not nitpick as much as Pascal compilers, they were notorious for such misfeatures as failing to check array boundaries and attempts to dereference null pointers. This omission was convenient for the programmer, who achieved a working program more quickly than would have been the case using Pascal, but the resulting product was frequently riddled with stack, heap and even code space corruption which were, and still are, the most fruitful places to compromise a program's security and insert tricky malware to "take over" a program, or even an entire system. Later versions of C, including C++, C# and Java, all incorporated some or all of Pascal's strong type checking in efforts to reduce this source of security problems.

Pascal itself went on to develop object-oriented extensions in Apple's Clascal and Borland's Turbo Pascal as well as the later Delphi system (a Delphi-compatible compiler and IDE are available at Wirth addressed some shortcomings in Pascal with succeeding languages - Modula took Bowle's units to add a powerful modular system allowing full type-checking even across compilation units. Oberon sought to refine Modula and make it easier to implement and more powerful and general in use. Oberon-2 added object orientation to Oberon.

The last iteration of Wirth's languages was the successor to Oberon-2 called "Component Pascal", which brings all the features explored in Wirth's other languages into a single, coherent whole. Versions are available for both the JVM and .NET platforms ( A Windows-based version is also available ( with an integrated development environment.

See Also[edit]