Skip to content

Pascal

Describe the data before telling the machine what to do

Niklaus Wirth designed Pascal around explicit data types and structured programs. Its language rules are separate from the native code, p-code or machine libraries supplied by a particular implementation.

Pascal asks a programmer to describe the data as well as the actions. A variable is declared with a type; a record can keep related fields together; a procedure names a piece of work. Niklaus Wirth’s revised language report explains two aims: a language suitable for teaching systematic programming, and implementations that could be reliable and efficient on available computers. (Wirth, Revised Report, 1973, introduction.)

That combination matters. Pascal was designed for real implementations as well as classroom explanations. Its structure was part of the programming model, rather than an instruction to make every program look like a numbered BASIC listing.

Give values a shape

The report’s standard scalar types include integers, real numbers, characters and Boolean values. A declaration establishes which kind of value a variable may hold. A subrange can narrow the permitted range, while an array arranges elements of a specified type under an index.

Records serve a different purpose. They group named components that can have different types: the description of an object need not be spread across several unrelated arrays. Sets and files provide other ways to organise values. These are language-level representations; their exact storage layout still depends on the implementation. (Revised Report, summary and data-type sections.)

Named procedures and functions divide a program’s work. Parameters express what information crosses a routine’s boundary. Blocks and structured statements then make the nesting of actions visible in the source.

The compiler is another choice

Pascal does not prescribe one home computer, graphics library or final executable format. A system can translate source to native machine code or to an intermediate representation executed by another program. A p-code environment is an implementation strategy, not the definition of Pascal itself.

Likewise, an implementation’s screen or sound routines are not automatically portable language features. A game using them needs the destination’s libraries and hardware conventions, just as a Microsoft BASIC listing with machine-specific graphics does.

A place in the BASIC debate

The BASIC curricula entry records the educational and commercial competition around these languages. Kyan’s period advertising pitched Pascal to home-computer users with strong speed claims. Such an advertisement establishes what was promised, not the measured result for every program.

The useful comparison is what the language makes explicit: types, data structures and routine boundaries. Those choices can help organise a program, while leaving algorithms, debugging and the surrounding machine as work the programmer still has to understand.

Sources

  • Niklaus Wirth, The Programming Language Pascal, Revised Report, ETH Zurich, July 1973, introduction and language summary. Original report; ETH publication record.
  • K. V. Nori, U. Ammann, K. Jensen and H. H. Nägeli, The PASCAL P Compiler: Implementation Notes, ETH report 10, December 1974, abstract: an original example of compilation for a hypothetical stack computer.
  • Kyan Software advertisement, COMPUTE!’s Gazette, June 1986, issue 36, “BASIC Is for Wimps!”: contemporary positioning only; no advertised speed multiplier is adopted here.

Checked. Verified against primary sources and signed off by a person.