ALGO is an algebraic programming language developed between 1959 and 1961 for the Bendix G-15 computer.
ALGO was one of several programming languages inspired by the Preliminary Report on the Language written in Zürich in 1958. This report underwent several modifications before becoming the Revised Report on which most ALGOL implementations are based. As a result, ALGO and other early "ALGOLs" have a very different syntax from ALGOL 60.
Other languages developed from the Zürich report include BENJAMIN, MAD (Michigan Algorithm Decoder) and NELIAC.
Here is the Trabb Pardo-Knuth algorithm in ALGO:
1 TITLE TRABB PARDO-KNUTH ALGORITHM
2 SUBSCript I,J
3 DATA A(11)
4 FORMAt FI(2DT), FLARGE(3D)
5 PROCEDURE F(T=Z)
9 FOR I=0(1)10
11 FOR J=0(1)10 BEGIN
15 IF Y > 400
16 GO TO LARGE
18 GO TO NEXT
19 LARGE: PRINT(FLARGE)=999
20 NEXT: CARR(1) END
- A title is the only type of comment allowed. Line numbers were inserted by the editor.
- Integer data type. The lower-case letters are not typos, but reflect the way in which ALGO code was presented in the original documentation.
- Only the size of an array can be specified, lower bound is always zero.
- The first format calls for a two-digit number followed by a tab, the second for a three digit number.
- The syntax of ALGO's procedure implementations is slightly different from that given in the Zurich report. Functions as defined by the Zürich report are not implemented.
- The syntax here is from the Zürich report and is also consistent with various 1950s-era autocodes.
- KEYBD reads a numeric value from the terminal.
This page is based on a Wikipedia article written by authors
Text is available under the CC BY-SA 3.0 license; additional terms may apply.
Images, videos and audio are available under their respective licenses.