ArticleslgStudy

engineering

ALGOL W

ALGOL W is a engineering topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand ALGOL W rather than just read about it. In short: ALGOL W is a programming language. It is based on a proposal for ALGOL X by Niklaus Wirth and Tony Hoare as a successor to ALGOL 60.

Key takeaways

  • ALGOL W belongs to engineering; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect ALGOL W to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of ALGOL W from memory before moving on to harder problems.

Reference excerpt

ALGOL W is a programming language. It is based on a proposal for ALGOL X by Niklaus Wirth and Tony Hoare as a successor to ALGOL 60. ALGOL W is a relatively simple upgrade of the original ALGOL 60, adding string, bitstring, complex number and reference to record data types and call-by-result passing of parameters, introducing the while statement, replacing switch with the case statement, and generally tightening up the language. Wirth's entry was considered too little of an advance over ALGOL 60, and the more complex entry from Adriaan van Wijngaarden that would later become ALGOL 68 was selected in a highly contentious meeting. Wirth later published his version as A contribution to the development of ALGOL. With a number of small additions, this eventually became ALGOL W. Wirth supervised a high-quality implementation for the IBM System/360 at Stanford University that was widely distributed. The implementation was written in PL360, an ALGOL-like assembly language designed by Wirth. The implementation includes influential debugging and profiling abilities. 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 was one of original Pascal's most-complained-about features.

Syntax and semantics ALGOL W's syntax is built on a subset of the EBCDIC character encoding set. In ALGOL 60, reserved words are distinct lexical items, but in ALGOL W, they are only sequences of characters, and do not need to be stropped. Reserved words and identifiers are separated by spaces. In these ways, ALGOL W's syntax resembles that of Pascal and later languages. The ALGOL W Language Description defines ALGOL W in an affix grammar that resembles Backus–Naur form (BNF). This formal grammar was a precursor of the Van Wijngaarden grammar. Much of ALGOL W's semantics is defined grammatically:

Identifiers are distinguished by their definition within the current scope. For example, a ⟨procedure identifier⟩ is an identifier that has been defined by a procedure declaration, a ⟨label identifier⟩ is an identifier that is being used as a goto label. The types of variables and expressions are represented by affixes. For example, ⟨τ function identifier⟩ is the syntactic entity for a function that returns a value of type τ, if an identifier has been declared as an integer function in the current scope, then that is expanded to ⟨integer function identifier⟩. Type errors are grammatical errors. For example, ⟨integer expression⟩ / ⟨integer expression⟩ and ⟨real expression⟩ / ⟨real expression⟩ are valid but distinct syntactic entities that represent expressions, but ⟨real expression⟩ DIV ⟨integer expression⟩ (i.e., integer division performed on a floating-point value) is an invalid syntactic entity.

Example This demonstrates ALGOL W's record type facility, including use of the null reference.

References

External links aw2c – ALGOL W compiler for Linux by Glyn Webster awe – current version by Glyn Webster 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

Worked examples

Example 1 — a first encounter with ALGOL W

Start with the simplest possible case. Write down what ALGOL W claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In engineering, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to ALGOL W before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about ALGOL W ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of ALGOL W

In research
ALGOL W appears in engineering research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses ALGOL W in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
ALGOL W is common in secondary-school and first-year university syllabi. It links to neighbouring topics ALGOL 60 dialect, Compiled programming languages, Procedural programming languages, so understanding it makes those chapters shorter.
In everyday life
Look for ALGOL W outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “ALGOL W” →

How to study ALGOL W in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what ALGOL W means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain ALGOL W out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is ALGOL W in simple terms?

ALGOL W is a programming language. It is based on a proposal for ALGOL X by Niklaus Wirth and Tony Hoare as a successor to ALGOL 60.

Why does ALGOL W matter?

Because it connects several engineering ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study ALGOL W?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on ALGOL W.

Tags

  • ALGOL 60 dialect
  • Compiled programming languages
  • Procedural programming languages
  • Programming languages created in 1966
  • Structured programming languages
  • Tony Hoare

Keep exploring