Pascal is a structured, strongly typed language designed by Niklaus Wirth at ETH Zurich, with the first compiler running in 1970. Named after the 17th-century mathematician Blaise Pascal, it became the standard teaching language at universities for nearly two decades and, through Turbo Pascal and Delphi, a serious tool for commercial software. To understand why Niklaus Wirth designed Pascal for teaching, start with the language he could not get accepted.

Origins: after ALGOL

In the mid-1960s, Wirth was a member of the IFIP Working Group 2.1, which was designing a successor to ALGOL 60. His proposal, a cleaner and more modest language, lost out to the far more complex design that became ALGOL 68. Wirth implemented his proposal anyway as ALGOL W (with contributions from C. A. R. Hoare) at Stanford. Back in Zurich, he went further and designed Pascal, which first ran on a CDC 6000-series mainframe in 1970. The defining report was published in 1971, and the Pascal User Manual and Report, with Kathleen Jensen, followed in 1974.

Why Niklaus Wirth designed Pascal for teaching

Wirth wanted a language that would teach programming as a systematic discipline. His stated goals were to support good habits and to be implementable efficiently on existing computers. In practice that meant:

  • Structured control flow with if, while, repeat, for and case, so students rarely needed goto.
  • Strong static typing, with the compiler catching mixing of incompatible values before the program ran.
  • User-defined types: records, enumerations, subranges, sets and pointers, letting students model data clearly.
  • Declare before use, with constants, types, variables and procedures in a fixed order, which made programs easy to read top to bottom and allowed a one-pass compiler.
  • A small language that a student could learn completely in one course.

His 1976 book Algorithms + Data Structures = Programs captured the idea: good programs come from careful choices of data and algorithms, and the language should make those choices visible.

A short Pascal example

program Factorials;
var
  i: integer;

function Fact(n: integer): integer;
begin
  if n <= 1 then
    Fact := 1
  else
    Fact := n * Fact(n - 1)
end;

begin
  for i := 1 to 7 do
    writeln(i:2, '! = ', Fact(i))
end.

A function returns its result by assigning to its own name, and the program ends with a full stop, two small details every Pascal student remembers.

From classrooms to commercial software

Several implementations carried Pascal far beyond Zurich:

YearImplementationWhy it mattered
Early 1970sPascal-P (ETH)Portable compiler producing P-code for a virtual machine
1977–78UCSD PascalKenneth Bowles' team ran the p-System on microcomputers, including Apple II
1983Turbo PascalAnders Hejlsberg's fast, cheap IDE from Borland
1983ISO 7185International standard for Pascal
1995DelphiBorland's Object Pascal environment for Windows

Apple used Pascal heavily for the Lisa and the early Macintosh. The original Mac Toolbox documentation was written with Pascal calling conventions, and Apple later developed Object Pascal with Wirth's input. Turbo Pascal, which compiled programs in seconds on an IBM PC, made Pascal a favourite of hobbyists and professional developers in the 1980s.

In education, the US Advanced Placement Computer Science exam used Pascal until it switched to C++ in 1999.

Criticism

Standard Pascal was strict and small, sometimes too small. In his 1981 paper "Why Pascal Is Not My Favorite Programming Language", Brian Kernighan pointed out that array sizes were part of the type, that there was no separate compilation, and that string handling was weak. Most commercial dialects solved these problems with their own extensions, at the cost of portability.

Influence and legacy

Wirth followed Pascal with Modula-2 (1978) and Oberon (1987). Pascal also shaped Ada, Euclid and Object Pascal, and its readable style influenced many later languages. Wirth received the ACM Turing Award in 1984 and died on 1 January 2024.

Is Pascal still used today?

Yes. Delphi, now sold by Embarcadero, is used for Windows, mobile and database applications, and the open-source Free Pascal compiler with the Lazarus IDE targets many platforms. Some schools still teach it, especially in Eastern Europe and in programming olympiad training. The reasons why Niklaus Wirth designed Pascal for teaching, clarity, strong typing and a language small enough to understand completely, still make it a sensible first language.

Frequently asked questions

Why is Pascal called Pascal?

Wirth named it after Blaise Pascal, the French mathematician and philosopher who built one of the first mechanical calculators in the 1640s. The name is not an acronym, so it is written "Pascal", not "PASCAL".

Why did universities stop teaching Pascal?

From the late 1980s, industry moved towards C, C++ and later Java, and universities followed to make students more employable. Standard Pascal's limits, such as weak strings and no separate compilation, also counted against it. The AP Computer Science exam's switch to C++ in 1999 marked the shift in the US.

What is the difference between Pascal and Delphi?

Pascal is the original language defined by Wirth. Delphi is a development environment that uses Object Pascal, an extended dialect with classes, units, exceptions and a large component library. Most modern Pascal code is written in Object Pascal using Delphi or Free Pascal.