ALGOL 58
From Wikipedia, the free encyclopedia
ALGOL 58 is the first language in the ALGOL programming language family. It was an early compromise design soon superseded by ALGOL 60; ALGOL 58 introduced the fundamental notion of compound statement, but it was restricted to control flow only, and it was not tied to identifier scope.
The language was originally proposed to be called IAL (International Algebraic Language), but at a meeting by members of the ACM and the Gamm in Zürich on May 27 1958 (ending June 1, 1958), IAL was rejected as an "'unspeakable' and pompous acronym" (Perlis, 1981), and ALGOL suggested instead, though not officially adopted until a year later. Unresolved disagreements also led to a plan to define two dialects, ALGOL 58 and ALGOL 60.
ALGOL 58 saw some implementation effort at IBM, but the effort was in competition with FORTRAN, and soon abandoned. It was also implemented at Dartmouth College on an LGP-30 but that implementation soon evolved into Algol 60. An implementation for the Burroughs 220 called BALGOL evolved along its own lines as well, but retained much of ALGOL 58's original character.
ALGOL 58's primary contribution was to later languages; it was used as a basis for JOVIAL, MAD, NELIAC and ALGO. It was also used during 1959 to publish algorithms in CACM, beginning a trend of using ALGOL notation in publication that continued for many years.
[edit] Comparison with ALGOL60
- IAL introduced the three-level concept of reference, publication and hardware language, and the concept of "word delimiters" having a separate representation from freely chosen identifiers (hence, no reserved words).
- The distinction between assignment (:=) and the equality relation (=) was introduced in IAL.
- Both IAL and ALGOL60 allowed arrays with arbitrary lower and upper subscript bounds, and allowed subscript bounds to be defined by integer expressions.
- Both IAL and ALGOL60 allowed nesting of procedure declarations and the corresponding identifier scopes.
- The IAL report described parameter substitution in much the same terms as the ALGOL 60 report, leaving open the possibility of call by name. It is unclear if this was realized at the time.
- IAL allowed numeric statement labels.
- The possibility of including non-ALGOL code within a program was already hinted at, in the context of parameters to procedures.
- Both IAL and ALGOL60 had a switch.
- In-line functions of the form f(x) := x / 2; were proposed in IAL and dropped in ALGOL60.
- IAL procedure declarations provided separate declaration lists for input and output parameters, a procedure could return multiple values; this mechanism was replaced in ALGOL60 with the value declaration.
- Variable declarations in IAL could be placed anywhere in the program and not necessarily at the beginning of a procedure.
- The for-statement had the form for i:=base(increment)limit, following conventions established in earlier automatic programming systems; ALGOL60 replaced the parentheses with the word delimiters step and until.
- The IAL if-statement did not have a then-clause or else-clause; it rather guarded the succeeding statement. IAL provided an if either-statement that cleanly allowed testing of multiple conditions. Both were replaced by ALGOL's if-then construct, with the introduction of the "dangling-else" ambiguity.
- IAL provided macro-substitution with the do-statement; this was dropped in ALGOL 60.
- IAL allowed to omit one or more array subscripts when passing arrays to procedures, and to provide any or all arguments to a procedure passed to another procedure.
- IAL's binary boolean operators were all of the same precedence level. Exponents were indicated with paired up and down arrows, which removed any confusion about the correct interpretation of nested exponents; ALGOL 60 replaced the paired arrows with a single up-arrow whose function was equivalent to FORTRAN's **.
- The IAL report did not explicitly specify which standard functions were to be provided, making a vague reference to the "standard functions of analysis." The ALGOL60 report had a more explicit list of standard functions.
[edit] External links
[edit] References
- Alan J. Perlis and K. Samelson, "Preliminary Report - International Algorithmic Language" Communications of the ACM 1(12) 1958, pp. 8-22
- Alan J. Perlis, "The American side of the development of ALGOL", in Richard L. Wexelblat, ed. History of Programming Languages (Academic Press, 1981)
Preceding: | Backus normal form |
Subsequent: | ALGOL, BALGOL, JOVIAL, MAD, NELIAC, ALGO |