ALGOL 60
注释与引用

↑  A thunk is an early limited type of closure. The environment passed for the thunk is that of the expression, not that of the called routine.
↑  这里采用了1976年修改版语言报告中的代码，对原版进行的修改是增加了i := k := 1;，针对的是数组的全部元素都是0的特殊情况。
↑  https://www.iso.org/standard/6126.html.
↑  Peter Naur;  et al. .   [2022-04-14]. （原始内容存档于2007-06-25）. Any occurrence of the procedure identifier within the body of the procedure other than in a left part in an assignment statement denotes activation of the procedure.  引文格式1维护：显式使用等标签 (link)
↑  Backus, J. W.; Bauer, F. L.; Green, J.; Katz, C.; McCarthy, J.; Perlis, A. J.; Rutishauser, H.; Samelson, K.; Vauquois, B.; Wegstein, J. H.; van Wijngaarden, A.; Woodger, M. Naur, Peter , 编. . Communications of the ACM (Copenhagen). May 1960, 3 (5): 299–314. ISSN 0001-0782. S2CID 278290. doi:10.1145/367236.367262.
↑  . 1963  [2020-04-23]. （原始内容存档于2007-06-25）.
↑   (PDF).   [2022-05-02]. （原始内容 (PDF)存档于2021-01-31）.
↑   (PDF).
↑  The Encyclopedia of Computer Languages 的存檔，存档日期September 27, 2011，.
↑  Daylight, E. G. . The Computer Journal（英语：）. 2011, 54 (11): 1756–1772  [2022-05-02]. doi:10.1093/comjnl/bxr002. （原始内容存档于2013-03-12）.
↑  Kruseman Aretz, F.E.J.  (PDF). . History of Computer Science. Kruislaan 413, 1098 SJ Amsterdam: Centrum Wiskunde & Informatica. 30 June 2003  [2022-05-02]. （原始内容 (PDF)存档于2021-10-23）.
↑  Edgar T. Irons. . Communications of the ACM, Vol. 4, p. 51. Jan. 1961  [2023-07-14]. （原始内容存档于2023-07-14）.  请检查|date=中的日期值 (帮助)
↑   (PDF). Computation Center, Dartmouth College. February 16, 1962  [2023-07-14]. （原始内容存档 (PDF)于2023-05-29）.
↑  Gries, D.; Paul, M.; Wiehle, H. R. . Communications of the ACM. 1965, 8 (8): 496–500. S2CID 18365024. doi:10.1145/365474.365511.
↑  Bayer, R.; Gries, D.; Paul, M.; Wiehle, H. R. . Communications of the ACM. 1967, 10 (12): 804–808. S2CID 3783605. doi:10.1145/363848.363866.
↑  Rechenautomaten mit Trommelspeicher （页面存档备份，存于）, Förderverein der Technischen Sammlung Dresden
↑  Mounier-Kuhn, Pierre. . IEEE Annals of the History of Computing. 2014, 36 (4): 6  [2024-10-28]. ISSN 1058-6180. （原始内容存档于2025-01-15）.
↑  Stephen J. Garland, Anthony W. Knapp, Thomas E. Kurtz,  (PDF), CCM-7A, Computation Center, Dartmouth College, Hanover, NH, January 1, 1964  [2023-07-14], （原始内容存档 (PDF)于2023-05-29）
↑  B.Randell, L.Russell.  (PDF). 1964  [2023-07-14]. （原始内容存档 (PDF)于2023-10-03）.
↑  Jean-Claude Boussard.  (学位论文). Institut d'informatique et mathématiques appliquées de Grenoble: Université Joseph-Fourier - Grenoble I. June 1964  [2022-05-02]. （原始内容存档于2022-04-10）.
↑  Claude Pair. . European Région 1620 Users Group (IBM). 27 April 1965.
↑  Kruseman Aretz, F.E.J. . Mathematical Centre Tracts. Amsterdam: Mathematisch Centrum. 1973.
↑  .   [2022-05-02]. （原始内容存档于2022-03-30）.
↑  .   [2020-04-23]. （原始内容存档于2020-03-22）.
↑  J. W. Backus, F. L. Bauer, J. Green, C. Katz, J. McCarthy, P. Naur, A. J. Perlis, H. Rutishauser, K. Samelson, B. Vauquois, J. H. Wegstein, A. van Wijngaarden, M. Woodger. Peter Naur , 编. . Communications of the ACM, Volume 6, Number 1, pages 1-17. January 1963  [2023-02-20]. （原始内容存档于2023-02-20）. A sequence of statements may be enclosed between the statement brackets begin and end to form a compound statement. ……
A sequence of declarations followed by a sequence of statements and enclosed between begin and end constitutes a block. Every declaration appears in a block in this way and is valid only for that block.
↑  Peter Naur;  et al. .   [2022-04-14]. （原始内容存档于2007-06-25）. A switch declaration defines the set of values of the corresponding switch designators. These values are given one by one as the values of the designational expressions entered in the switch list. With each of these designational expressions there is associated a positive integer, 1, 2, ..., obtained by counting the items in the list from left to right. The value of the switch designator corresponding to a given value of the subscript expression ( …… ) is the value of the designational expression in the switch list having this given value as its associated integer.  引文格式1维护：显式使用等标签 (link)

Heinz Rutishauser（英语：）.  (PDF). Springer-Verlag New York Inc. 1967  [2023-07-06]. ISBN 978-3-642-86936-5. doi:10.1007/978-3-642-86934-1. （原始内容存档 (PDF)于2022-12-22）. “25.4.3.



 
«
begin
    switch wernik := ariea, aeryl, m17, larix;
    goto wernik[k];
arica: ; comment this fo​r k = 1 ;
    ⋮
    goto common;
aeryl: ; comment this fo​r k = 2 ;
    ⋮
    goto common;
m17: ; comment this fo​r k = 3 ;
    ⋮
    goto common;
larix: ; comment this fo​r k = 4 ;
    ⋮
common: 
end


».
 

Here, by virtue of switch wernik, the computation follows one of four possible branches of the program depending on the current value of k. Afterwards the common course of the calculation (i.e. the statements which would follow «end») is taken up again.”
↑  Heinz Rutishauser（英语：）.  (PDF). Springer-Verlag New York Inc. 1967  [2023-07-06]. ISBN 978-3-642-86936-5. doi:10.1007/978-3-642-86934-1. （原始内容存档 (PDF)于2022-12-22）. “42.5.1. The operands of a block B are defined as those quantities existing outside the block which are involved in the execution of the block. Obviously the quantities global to B are operands of B provided they are actually used inside B. ……

42.5.2. Hidden operands. A block may have hidden operands: Indeed, if a procedure P is operand of block B, …… the global parameters of P are also involved in the execution of B, hence operands of B. We call these hidden operands of B because they cannot be found by inspection of block B but only by inspection of the declaration for procedure P, which is given somewhere outside B. ……

42.5.3. The operands of a block B fall into the following four categories:

⒜ Arguments …… ⒝ Results …… ⒞ Transients: …… which have properties of both arguments and results …… ⒟ Exits: Labels referring to destinations located outside B and switches which are declared outside B. ……

52.3.1. Considering a mathematical expression, e.g. an integral
     I=\int _{0}^{1}f(x,y)\,\mathrm {d} x
it is seen that the variables x and y serve entirely different purposes: y is a variable upon which the value of I depends; in mathematical logic this is called a free variable (of the expression). This latter term indicates that one is free to substitute a value, e.g. 2.75, for y, where-upon one obtains the result
     I=\int _{0}^{1}f(x,2.75)\,\mathrm {d} x
The variable x, on the other hand, is only an auxiliary object for describing the operation to be performed by the expression. It is called a bound variable since it is not accessible from outside the expression. ……

52.3.2. Comparing these examples with an ALGOL procedure and the terminology used ……, it becomes obvious that the free variables correspond to what are called the operands of a procedure, while the bound variables correspond to the internal quantities.”
↑  Heinz Rutishauser（英语：）.  (PDF). Springer-Verlag New York Inc. 1967  [2023-07-06]. ISBN 978-3-642-86936-5. doi:10.1007/978-3-642-86934-1. （原始内容存档 (PDF)于2022-12-22）. “9.1.2. An array is a set of elements, called the components of the array, everyone of which behaves like a simple variable. The components of an array are distinguished by a set of p integers (subscripts)i1, i2, ……, ip, where p is called the dimension of the array. If we interpret the subscripts as coordinates in a p-dimensional space, then the entire array corresponds to the total of all unit-gridpoints in a p-dimensional hyperbox

    lk ≤ ik ≤ uk  (k = 1, 2, ……, p),

whose boundaries (i.e. the array bounds l1, l2 ……, lp, u1, u2, ……, up) are given in the corresponding array declaration ……. ……

14.3.2. A subscripted variable «I[E1, E2, ……, Ep]», if encountered in an expression, represents also a single value defined as follows: Evaluate the subscript expressions E1, E2, ……, Ep; if their values are i1, i2, ……, ip, then the subscripted variable represents the value that has most recently been assigned to the i1, i2, ……, ip-component of the array I.”
↑  Heinz Rutishauser（英语：）.  (PDF). Springer-Verlag New York Inc. 1967  [2023-07-06]. ISBN 978-3-642-86936-5. doi:10.1007/978-3-642-86934-1. （原始内容存档 (PDF)于2022-12-22）. “
19.7.1. «x + (if t > t1 then 1 else -1) / x».
We recall that a conditional arithmetic expression cannot be used directly as a primary in a larger expression, but must for this purpose be enclosed in parentheses (the sequence «+ if» is always illegal).

19.7.2. Selection of a component of an array with safeguards against exceeding the array bounds:
     «a[if k > n then n else if k < 1 then 1 else k]».

19.7.3. Where conditional expressions are intended as comparands of a relation or as alternatives of a conditional expression, they must again be enclosed in parentheses:
     «if (if u then x else y) > 0 then (if z = 0 then x + y else x - y) else x × y».”
↑  Heinz Rutishauser（英语：）.  (PDF). Springer-Verlag New York Inc. 1967  [2023-07-06]. ISBN 978-3-642-86936-5. doi:10.1007/978-3-642-86934-1. （原始内容存档 (PDF)于2022-12-22）. “44.2. …… The operands of a procedure, i.e. the quantities involved in its execution, are essentially the operands of the fictitious block which - if S stands for the procedure body - is defined as the construction
    «begin real æ; S end»1, 2.
……
1 The declaration of the fictitious variable æ serves solely to make this piece of program a block.
2 In case S is already an unlabelled block, this artificial construction is unneeded and we could take S instead. ……”
↑  Heinz Rutishauser（英语：）.  (PDF). Springer-Verlag New York Inc. 1967  [2023-07-06]. ISBN 978-3-642-86936-5. doi:10.1007/978-3-642-86934-1. （原始内容存档 (PDF)于2022-12-22）. “45.2.3. Name conflicts. …… Indeed, without this rule, the effect of a call «x(z)» of a


 
«
procedure x(y);
    real y;
    begin real z; z := 2 × y; y := y / z end


»
 

would erroneously be interpreted as

  «begin real z; z := 2 × y; z := z / z end»,

which certainly was not the intention of the designer of the procedure. With the above amendment, however, the internal z is changed into zæ, after which we obtain the equivalence block correctly as

  «begin real zæ; zæ := 2 × z; z := z / zæ end».”
↑  Heinz Rutishauser（英语：）.  (PDF). Springer-Verlag New York Inc. 1967  [2023-07-06]. ISBN 978-3-642-86936-5. doi:10.1007/978-3-642-86934-1. （原始内容存档 (PDF)于2022-12-22）. “44.2. Operands of a procedure …… Indeed, execution of a procedure means essentially execution of this fictitious block, …… However, it is one of the most important properties of procedures that their operands - besides being distinguished as arguments, results, transients and exits - fall into three categories, namely
⒜ Those operands of the fictitious block whose identifiers are not quoted in the formal parameter part are called global operands of the procedure. …… ⒝…… formal operands ……⒞…… hidden operands ……

44.3.1. A global parameter - that is, the identifier of a global operand - represents the same quantity inside the procedure body as outside in the environment of the procedure declaration. A global operand is therefore simply the extension of a quantity which exists outside the procedure. As a consequence we have

44.3.2. The environment rule for global parameters:
If the identifier I is global parameter of a procedure, then a (true or formal) quantity Q with that identifier must exist in the environment of the procedure declaration, and it is this Q which in a call of the procedure is meant by the identifier I.

According to this rule, a global parameter acts like a thread which links the procedure declaration permanently to its environment; indeed, a procedure which has global parameters is only fully defined if it is embedded into an ALGOL program in which the global operands are properly declared.”
↑  Heinz Rutishauser（英语：）.  (PDF). Springer-Verlag New York Inc. 1967  [2023-07-06]. ISBN 978-3-642-86936-5. doi:10.1007/978-3-642-86934-1. （原始内容存档 (PDF)于2022-12-22）. “45.2.4. Suppressed global operands. …… Consider, for instance


 
«
begin
    integer t;
    procedure common(x); real x; t := x;
z:  begin
        real t;
        common(t);
    end z
end


».
 

Here the integer type variable t is suppressed in block z, and therefore the actual parameter of the call «common(t)» refers to the real type
variable which is local to block z. …… the t occurring as global parameter of procedure common refers to the
suppressed quantity t. The above rule makes this evident by requiring that the name of the real type variable t be changed throughout block z into tee before the substitution rule is applied:


 
«
begin
    integer t;
    procedure common(x); real x; t := x;
z:  begin
        real tæ;
        common(tæ);
    end z
end


».
 

Now the substitution rule yields the equivalent block for the call «common(t)» correctly as (æ denoting again the hypothetical variable necessary to make this piece of program a block)

  «begin real æ; t := tæ end».

Accordingly, this call accomplishes something which would seem impossible, namely changing the value of a suppressed variable.

45.2.5. ……Consequently no name changes apply where the identifier of a global operand not suppressed at the location of a procedure call coincides with the identifier of an actual operand.”
↑  Heinz Rutishauser（英语：）.  (PDF). Springer-Verlag New York Inc. 1967  [2023-07-06]. ISBN 978-3-642-86936-5. doi:10.1007/978-3-642-86934-1. （原始内容存档 (PDF)于2022-12-22）. In view of its ad-hoc character it seems doubtful that the Jensen device (and to some extent even the full name-concept) is the last word in programming language design. Indeed, the dependence of the components of an array upon its subscripts (and likewise the dependence of a function upon its arguments) is more appropriately described by means of CHURCH'S lambda notation rather than through the bound variables of a computing process. Accordingly, we conclude with a sideview to a possibility for introducing this notation in a future ALGOL, but in doing so we strictly adhere to a SUBSET like language-concept, i.e. one in which quantities rather than names play the fundamental role.
↑  Peter Naur;  et al. .   [2022-04-14]. （原始内容存档于2007-06-25）. Parameter delimiters. All parameter delimiters are understood to be equivalent. No correspondence between the parameter delimiters used in a procedure statement and those used in the procedure heading is expected beyond their number is the same. Thus the information conveyed by using the elaborate ones is entirely optional.  引文格式1维护：显式使用等标签 (link)
↑  E. T. Irons. . Communications of the ACM (Association for Computing Machinery (ACM)). January 1, 1961, 4 (1): 65–69. ISSN 0001-0782. S2CID 42778823. doi:10.1145/366062.366090 .
↑  Ingerman, P. Z. . Communications of the ACM (Association for Computing Machinery (ACM)). 1961-01-01, 4 (1): 55–58. ISSN 0001-0782. S2CID 14646332. doi:10.1145/366062.366084 .
↑  Heinz Rutishauser（英语：）.  (PDF). Springer-Verlag New York Inc. 1967  [2023-07-06]. ISBN 978-3-642-86936-5. doi:10.1007/978-3-642-86934-1. （原始内容存档 (PDF)于2022-12-22）. “49.3.2. For inarray and outarray the order in which the components of the array b are transferred is defined to be what for matrices (two-dimensional arrays) is usually called "row-wise". More precisely: b[i1, i2, ……, ip] is transferred before b[j1, j2, ……, jp] provided we have for some h ≤ p:

    il = jl for l = 1, 2, ……, h - 1, but ih < ih.

Moreover, these procedures always transfer all components of the array appearing as the second actual operand.

As a consequence, a call «outarray(15, p)», where p is declared e.g. as «array p[-4:5, 1:50, 0:20]», is equivalent to


 
«
for j1 := -4 step 1 until 5 do
    for j2 := 1 step 1 until 50 do
        for j3 := 0 step 1 until 20 do outreal(15, p[j1, j2, j3])


».”