Professional Documents
Culture Documents
ALGO Is An Algebraic Programming Language Developed Between 1959 and 1961 For The Bendix G
ALGO Is An Algebraic Programming Language Developed Between 1959 and 1961 For The Bendix G
ALGO Is An Algebraic Programming Language Developed Between 1959 and 1961 For The Bendix G
1 Example
1.1 Remarks
2 See also
3 External links
Example[edit]
Here is the Trabb Pardo-Knuth algorithm in ALGO:
1.TITLETRABBPARDOKNUTHALGORITHM2.SUBSCriptI,J3.DATA
A(11)4.FORMAtFI(2DT),FLARGE(3D)5.PROCEdureF(T=Z)6.BEGIN
7.Z=SQRT(ABS(T))+5*T^38.END9.FORI=0(1)1010.A[I]=KEYBD11.
FORJ=0(1)10BEGIN11.I=J1012.F(A[I]=Y)13.PRINT(FI)=I14.
IFY>40015.GOTOLARGE16.PRINT(FL)=Y17.GOTONEXT18.
LARGE:PRINT(FLARGE)=99919.NEXT:CARR(1)END20.END
Remarks[edit]
1. A title is the only type of comment allowed. Line numbers were inserted by the
editor.
2. Integer data type. The lower-case letters are not typos, but reflect the way in
which ALGO code was presented in the original documentation.
3. Only the size of an array can be specified, lower bound is always zero.
4. The first format calls for a two-digit number followed by a tab, the second for a
three digit number.
9. The syntax here is from the Zrich report and is also consistent with various
1950s-era autocodes.
See also[edit]
Look up algo in
Wiktionary, the free
dictionary.
ALGOL 58
ALGOL 60
External links[edit]