Est. 1970 Beginner

Pascal

A procedural programming language designed for teaching structured programming and data structuring. The foundation for Delphi and Object Pascal.

Created by Niklaus Wirth

Paradigm Imperative, Procedural, Structured
Typing Static, Strong
First Appeared 1970
Latest Version Free Pascal 3.2.2 (2021), Delphi 12 (2023)

Pascal holds a special place in computing history as the language that taught a generation of programmers the principles of structured programming. Designed with clarity and discipline in mind, Pascal proved that code could be both readable and efficient.

History & Origins

In the late 1960s, Niklaus Wirth at ETH Zürich was dissatisfied with the complexity of ALGOL 68. He set out to create a smaller, more elegant language that would be suitable for teaching programming while remaining powerful enough for practical use.

Named after the French mathematician and philosopher Blaise Pascal, the language was published in 1970. Wirth’s design goals were clear:

  1. Educational clarity - Easy to learn and teach
  2. Structured programming - Enforce good programming habits
  3. Strong typing - Catch errors at compile time
  4. Efficient compilation - Fast compilation to encourage experimentation

The Turbo Pascal Revolution

While academic Pascal implementations were useful for teaching, Borland’s Turbo Pascal (1983) changed everything. For just $49.95, developers got:

  • A blazingly fast compiler (compile times measured in seconds)
  • An integrated editor
  • Excellent error messages
  • Small executable sizes

This was revolutionary when competitors cost thousands of dollars and took minutes to compile. Turbo Pascal democratized programming and created a generation of Pascal developers.

Why Pascal Still Matters

1. Teaching Structured Programming

Pascal’s strict enforcement of declaring variables before use, its clear block structure, and its readable syntax make it an excellent teaching language. Many computer science programs still use Pascal or Pascal-derived languages.

2. Delphi and RAD Development

Object Pascal (Delphi) remains one of the most productive environments for building Windows applications. Its visual form designer and component-based architecture influenced many later tools, including Visual Basic, C# Windows Forms, and modern IDEs.

3. Cross-Platform Development

Modern Pascal tools like Free Pascal and Lazarus provide true cross-platform development:

  • Windows, macOS, Linux, FreeBSD
  • iOS and Android
  • Embedded systems (ARM, AVR)
  • WebAssembly (experimental)

Pascal Dialects

Several Pascal variants exist today:

DialectDescriptionStatus
Standard PascalISO 7185 (1983)Reference standard
Extended PascalISO 10206 (1990)Extended standard
Turbo PascalBorland’s dialectHistoric, compatible mode in FPC
Object PascalOOP extensionsActive (Delphi, FPC)
Free PascalOpen-source, multi-platformVery active

Modern Pascal Compilers

Free Pascal (FPC)

The open-source compiler supporting multiple platforms and Pascal dialects:

1
2
3
4
5
6
7
8
9
# Install on macOS
brew install fpc

# Install on Ubuntu/Debian
sudo apt install fpc

# Compile and run
fpc hello.pas
./hello

Lazarus IDE

A Delphi-compatible RAD IDE built on Free Pascal:

  • Visual form designer
  • Component library (LCL)
  • Cross-platform GUI development
  • Free and open-source

Delphi (Commercial)

Embarcadero’s commercial IDE:

  • Professional RAD environment
  • FireMonkey cross-platform framework
  • Enterprise database tools
  • Active development and support

Language Features

Pascal introduced or popularized many features now common in programming:

program Features;

type
    // Enumerated types
    Color = (Red, Green, Blue);

    // Record types (like structs)
    Person = record
        Name: string;
        Age: Integer;
    end;

    // Set types
    CharSet = set of Char;

var
    c: Color;
    p: Person;
    vowels: CharSet;

begin
    c := Blue;
    p.Name := 'Alice';
    p.Age := 30;
    vowels := ['A', 'E', 'I', 'O', 'U'];

    if 'A' in vowels then
        WriteLn('A is a vowel');
end.

Getting Started

Pascal code is stored in .pas files. The basic structure:

program ProgramName;

{ Declarations go here }

begin
    { Main code goes here }
end.

Continue to the Hello World tutorial to write your first Pascal program.

Timeline

1970
Niklaus Wirth publishes Pascal specification
1973
Pascal-P portable compiler released
1975
UCSD Pascal brings Pascal to microcomputers
1983
Turbo Pascal released by Borland - revolutionizes PC development
1985
Apple adopts Pascal for Macintosh development
1986
Turbo Pascal 4.0 introduces units (modules)
1995
Delphi 1.0 released - Object Pascal for Windows RAD
1997
Free Pascal project begins
2001
Kylix brings Delphi/Pascal to Linux
2011
Delphi XE2 adds cross-platform support (Windows, Mac, iOS)
2023
Delphi 12 Athens released with modern language features

Notable Uses & Legacy

Turbo Pascal Revolution

Borland's Turbo Pascal (1983) was one of the first affordable, fast IDEs for PCs, introducing millions to programming and professional software development.

Early Macintosh Development

Apple chose Pascal as the primary language for Macintosh application development in the 1980s, with the original Mac Toolbox APIs written in Pascal.

Skype

The original Skype client was developed using Delphi (Object Pascal), demonstrating Pascal's capability for building complex, real-world applications.

Total Commander

One of the most popular file managers for Windows, Total Commander has been developed in Delphi since the 1990s and is still actively maintained.

Game Development

Many classic DOS games were written in Turbo Pascal, and modern game engines like Castle Game Engine use Free Pascal/Lazarus.

Language Influence

Influenced By

ALGOL 60 ALGOL W

Influenced

Modula-2 Oberon Ada Object Pascal Delphi Java C#

Running Today

Run examples using the official Docker image:

docker pull freepascal/fpc:latest

Example usage:

docker run --rm -v $(pwd):/app -w /app freepascal/fpc:latest sh -c 'fpc hello.pas && ./hello'

Topics Covered

Last updated: