ALGO

ALGO is an algebraic programming language developed for the Bendix G-15 computer.[1]

ALGO
Paradigmprocedural, imperative, structured
FamilyALGOL
DeveloperBendix Corporation
First appeared1961 (1961)
Typing disciplinestatic, strong
ScopeLexical
Implementation languageAssembly
PlatformBendix G-15
Influenced by
ALGOL 58

ALGO was one of several programming languages inspired by the Preliminary Report on the International Algorithmic 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 ALGOL-related languages have a very different syntax from ALGOL 60.

Example

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)
 6 BEGIN
 7 Z=SQRT(ABS(T))+5*T^3
 8 END
 9 FOR I=0(1)10
10 A[I]=KEYBD
11 FOR J=0(1)10 BEGIN
12 I=J-10
13 F(A[I]=Y)
14 PRINT(FI)=I
15 IF Y > 400
16 GO TO LARGE
17 PRINT(FL)=Y
18 GO TO NEXT
19 LARGE: PRINT(FLARGE)=999
20 NEXT: CARR(1) END
21 2END

Remarks

  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.
  5. 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.
  6. The syntax here is from the Zürich report and is also consistent with various 1950s-era autocodes.
  7. KEYBD reads a numeric value from the terminal.
gollark: This is NOT what an acceptable solution looks like, PostgreSQL.
gollark: I *think* the issue here is in the returning bit... somehow...
gollark: Yes.
gollark: And yes, this is a hybrid of JS and SQL via template strings, isn't it great?
gollark: And this doesn't even ACTUALLY WORK.

See also

References

  1. "The Bendix G-15 General Purpose Digital Computer System". Archived from the original on 4 December 2004. Retrieved 10 July 2020.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.