Professional Documents
Culture Documents
Algol W: Jump To Navigationjump To Search
Algol W: Jump To Navigationjump To Search
ALGOL W
Paradigms Multi-
Family ALGOL
Scope Lexical
Implementation PL360
language
OS Linux
Influenced by
ALGOL 60
Influenced
Pascal, Modula-2
ALGOL W served as the basis for the Pascal language, and the syntax of ALGOL
W will be immediately familiar to anyone with Pascal experience. The key
differences are improvements to record handling in Pascal, and, oddly, the loss of
ALGOL W's ability to define the length of an array at runtime, which is one of
Pascal's most-complained-about features.
Contents
Example[edit]
This demonstrates ALGOL W's record type facility.
RECORD PERSON (
STRING(20) NAME;
INTEGER AGE;
LOGICAL MALE;
REFERENCE(PERSON) FATHER, MOTHER, YOUNGESTOFFSPRING, ELDERSIBLING
);
Implementation[edit]
The major part of ALGOL W, amounting to approximately 2,700 cards, was written
in Wirth's PL360. An interface module for the IBM operating system (OS) in use
(OS, DOS, MTS, ORVYL) was written in IBM assembly language, amounting to
fewer than 250 cards. [1]
In an OS environment on a 360/67 with spooled input and output files, the compiler
will recompile itself in about 25 seconds. The compiler is approximately 2700 card
images. Thus, when the OS scheduler time is subtracted from the execution time
given above, it is seen that the compiler runs at a speed in excess of 100 cards per
second (for dense code).
In a DOS environment on a 360/30, the compiler is limited only by the speed of the
card reader. The compiler has successfully recompiled itself on a 64K 360/30 at a
rate of 1200 cards per minute (the speed of the card reader). This is impressive
when compared to the time needed for the DOS Assembler to assemble the
interface module which consists of under 250 cards. When the macro instructions
are expanded, the DOS interface has 972 card images and the Assembler takes
15 minutes for the assembly.
References[edit]
1. ^ Jump up to:a b Wirth, Niklaus; Hoare, C. A. R. (June 1966). "A contribution to the
development of ALGOL". Communications of the ACM. 9: 413–432. Retrieved 7
October 2020 – via Association for Computing Machinery.
2. ^ Jump up to:a b Bauer, Henry R.; Becker, Sheldon I.; Graham, Susan L.; Forsythe,
George E.; Satterthwaite, Edwin H. (March 1968). Technical Report Number: CS-TR-
68-89. Computer Science Department (Report). Stanford University. (Various
documents for Stanford's 1972 implementation of ALGOL W; this report includes
the ALGOL W Language Description.
3. ^ Sites, Richard. "ALGOL W Reference Manual" (PDF). i.stanford.edu. Stanford
University. Retrieved 24 July 2022.
4. ^ Jump up to:a b Bauer, Henry R.; Becker, Sheldon I.; Graham, Susan L.; Satterthwaite,
Edwin H.; Sites, Richard L. (June 1972). ALGOL W Language
Description (PDF) (Report).
5. ^ van Wijngaarden, Adriaan (22 October 1965). Orthogonal Design and Description of a
Formal Language: MR76 (PDF) (Report). Amsterdam, Netherlands: Mathematical
Centre. Archived from the original (PDF) on 29 October 2019. Retrieved 7
October 2020 – via Ernst-Abbe-Hochschule Jena, University of Applied Sciences,
Germany.
External links[edit]
• aw2c – ALGOL W compiler for Linux
• awe – aw2c updated version
• ALGOL W @ Everything2 – informal but detailed description of the
language by a former user, with sidebars extolling ALGOL W
over Pascal as an educational programming language
• 1969 ALGOL W compiler listing at bitsavers.org
• The Michigan Terminal System Manuals, Volume 16: ALGOL W in MTS
• ALGOL W materials More than 200 ALGOL W programs and
documentation