ALGOL 60 Problems, Ambiguities & the Modified Report
Knuth's 1967 paper listed ambiguities and problems in the Revised Report.
20.1 Knuth's "Remaining Trouble Spots"
Knuth's 1967 paper listed ambiguities and problems in the Revised Report. The main ones:
Resolution / practice Side effects Function designators may change non-local variables; the order of evaluating operands is unspecified, so f(x) + x may vary
Modified Report: order still unspecified; avoid side effects in expressions own variables
Initial value unspecified; meaning with recursion and dynamic own arrays unclear
Modified Report: own arrays need constant bounds; initialize explicitly for loop variable
Undefined after normal exit; step/until re-evaluated; jumping into loops undefined
Don't rely on the value; don't modify limits in the body Call by name of expressions
Assigning to a formal whose actual is an expression Integer labels
10: S allowed but awkward with call by name Removed in the Modified Report
Some could be omitted, making compile-time checking impossible Modified Report: all required Type of conditional expression
if b then 1 else 2.5 — integer or real?
Result is real if either branch is real Exponentiation rules
Complex rules for integer ↑ integer, 0 ↑ 0, negative bases Clarified; still a portability trap Comments after end Swallow text until ;, end or else
Always put ; after end when another statement follows Switch subscript out of range Dummy statement vs error Modified Report: undefined (error) Only as parameters; no character type
Use inchar/outchar with index strings Left to implementations Modified Report environment Procedure parameter types
real procedure f gives no parameter information Fixed in ALGOL 68 (PROC (REAL) REAL)
20.2 The Modified Report (1976)
Produced by an IFIP WG 2.1 subcommittee (R. M. De Morgan, I. D. Hill, B. A. Wichmann), it:
Resolved ambiguities while keeping the language the same in spirit.
Defined the environmental block of standard procedures, including I/O (§19.4).
Removed integer labels and required complete specifications.
Was adopted as an international standard (ISO 1538).
MARST implements this Modified Report.
20.3 Subsets
Many implementations supported subsets: IFIP's SMALGOL (1964), the ECMA subset, and the ALCOR subset. Common restrictions were: no recursion, no call by name of expressions, no own dynamic arrays, mandatory specifications, and no integer labels.
20.4 Missing features (that later languages added)
Missing in ALGOL 60 ALGOL W (records), Simula (classes), ALGOL 68 (STRUCT), Pascal ALGOL W, ALGOL 68, Pascal characters & strings while, repeat, case statements ALGOL 68 (MODE), Pascal (type) ALGOL 68 (transput), Pascal modules / separate compilation Simula, ALGOL 68-R, Modula-2, Ada
ALGOL 68 (PAR, SEMA), Burroughs ALGOL (events, tasks)