Penguin
Note: You are viewing an old revision of this page. View the current version.

A ProgrammingLanguage by Nicolas Wirth?. Once very popular in schools before students started whining they wanted to learn C.

A Sample

(I'm off finding one right now.)

History

Pascal became popular very quickly because the original compiler3? was designed to be very easy to port?. It was written in Pascal and compiled to ByteCodes?, called P-Code. All anyone had to do to get a Pascal compiler working on a new machine was to write a simple P-Code VirtualMachine for it -- they could hack the compiler around to general proper MachineCode later.

This meant that Pascal spread very quickly through the world's Universities. They began teaching in Pascal, because it was a very good langauge to demonstate StructuredProgramming? in -- a topic that was in vogue at the time1?.

Standard Pascal was nice language with terrible limitations: Pascal programs could not open files by name and could barely handle strings. BrianKernighan famously described Pascal's problems in Why Pascal is Not My Favorite Programming Language2?. These limitations mean that Pascal immediately splintered into dialects as people hacked in these missing features in incompatible ways. C did not have this problem, so it gradually took over from the Pascal dialects.

Implementations

The most successful Pascal dialect has been Borland's TurboPascal. Further extended with Modula2-like modules and C++-like OOP it became Delphi, which exists on Linux nowadays under the name Kylix.

The two OpenSorce? Pascal compilers for Linux are: GNU Pascal and Free Pascal. Free Pascal tend more towards TurboPascal compatability.


1? it hasn't gone away: programmers just take it for granted that code should be structured now.

2? Take this with a little grain of salt: Nicolas Wirth? had already addressed most of Pascal's problems in his next langauge Modula2 before BrianKernighan wrote this paper, and in some places BrianKernighan seems to be just complaining that Pascal is not C.

3? The online book Pascal Implementation: A Book and Sources walks you through the source code to this compiler. It's educational to read just as an extended critique of a non-trivial program.