ALGOL W
ALGOL-W is a programming language. It was based on a proposal for ALGOL-X by Niklaus Wirth and Tony Hoare as a successor to ALGOL 60 in the IFIP Working Group 2.1. When the committee decided that the proposal was not a sufficient advance over ALGOL 60, the proposal was published Niklaus Wirth & C. A. R Hoare (1966). Wirth supervised a high quality implementation for the IBM/360 at Stanford University that was widely distributed.
It represented a relatively conservative modification of ALGOL 60, adding string, bitstring, complex number and reference to record datatypes and call-by-result passing of parameters, introducing the while statement, replacing switch with the case statement, and generally tightening up the language.
The implementation was written in PL/360, an ALGOL-like assembly language designed by Wirth. The implementation included influential debugging and profiling capabilities.
Syntax
ALGOL-W is small and statically typed (like most of Wirth's languages (including Pascal, Modula-2 and Oberon) but not Euler, which has dynamic types). The language that eventually became ALGOL 68 is much larger and more complex than ALGOL-W, and it differs more from ALGOL 60 than ALGOL-W does.
record PERSON ( string NAME; integer AGE; logical MALE; reference(PERSON) FATHER, MOTHER, YOUNGESTOFFSPRING, ELDERSIBLING ); reference(PERSON) procedure YOUNGESTUNCLE (reference(PERSON) R); begin reference(PERSON) P, M; P := YOUNGESTOFFSPRING(FATHER(FATHER(R))); while (P ¬= null) and (¬ MALE(P)) or (P = FATHER(R)) do P := ELDERSIBLING(P); M := YOUNGESTOFFSPRING(MOTHER(MOTHER(R))); while (M ¬= null) and (¬ MALE(M)) do M := ELDERSIBLING(M); if P = null then M else if M = null then P else if AGE(P) < AGE(M) then P else M end
External links
- aw2c, an ALGOL-W compiler for Linux.
- Niklaus Wirth & C. A. R Hoare (1966) A contribution to the development of ALGOL. Communications of the ACM, Vol.9, pp. 413 - 432
- Stanford Computer Science Department Technical Report CS-TR-68-89 Various documents for Stanford University's 1972 implementation of ALGOL-W. The report includes the ALGOL W Language Description.
- Algol W @ Everything2 An informal but detailed description of the language by a former user, with sidebars extolling ALGOL-W over Pascal as an Educational programming language.
Stub icon | This computer science article is a stub. You can help Wikipedia by expanding it. |
If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...