两个传名调用形式参数,其对应的实际参数之间可能存在依赖关系,比如第一个是整数变量i,而第二个是下标变量A[i],从而导致后者形式参数也依赖于前者形式参数,利用传名调用和这种副作用可以实现Jensen设备(英语:Jensen's Device)[32];它典型的用于定义对应于的级数过程Sum(k, l, u, ak),它有两个传名调用的形式参数:索引变量k和通项(general)表达式ak。
对于交换两个参数的值的swap(x, y)过程,其过程主体定义为:t:=x; x:=y; y:=t,这种依赖性副作用会导致可能出现异常行为,由于名字替代机制相当于宏展开(expansion),过程语句swap(i, A[i])中下标变量A[i]的下标i未经求值,对应的过程主体就转换成为:t:=i; i:=A[i]; A[i]:=t。1964年IFIP(英语:International Federation for Information Processing)工作组2.1(英语:IFIP Working Group 2.1)制定了《SUBSET ALGOL 60报告》,在这个子集语言中对“完全的名字概念”(full name-concept)增加了一项限制:在名字替代(传名调用)中,实际参数只能是一个标识符或字符串。
^Peter Naur; et al. Revised Report on the Algorithmic Language Algol 60. [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 , 编. Report on the Algorithmic Language ALGOL 60. Communications of the ACM (Copenhagen). May 1960, 3 (5): 299–314. ISSN 0001-0782. S2CID 278290. doi:10.1145/367236.367262.
^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 , 编. Revised Report on the Algorithmic Language ALGOL 60. 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. Revised Report on the Algorithmic Language Algol 60. [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(英语:Heinz Rutishauser). Description of ALGOL 60(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.
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(英语:Heinz Rutishauser). Description of ALGOL 60(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 Bprovided 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 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 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(英语:Heinz Rutishauser). Description of ALGOL 60(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 boundsl1, 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(英语:Heinz Rutishauser). Description of ALGOL 60(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+(ift>t1then1else-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[ifk>nthennelseifk<1then1elsek]».
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(ifuthenxelsey)>0then(ifz=0thenx+yelsex-y)elsex×y».”
^Heinz Rutishauser(英语:Heinz Rutishauser). Description of ALGOL 60(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 «beginrealæ;Send»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. ……”
would erroneously be interpreted as «beginrealz;z:=2×y;z:=z/zend»,
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 «beginrealzæ;zæ:=2×z;z:=z/zæend».”
^Heinz Rutishauser(英语:Heinz Rutishauser). Description of ALGOL 60(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.”
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:
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) «beginrealæ;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(英语:Heinz Rutishauser). Description of ALGOL 60(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. Revised Report on the Algorithmic Language Algol 60. [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. Comments on the Implementation of Recursive Procedures and Blocks in ALGOL. 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. Thunks: a way of compiling procedure statements with some comments on procedure declarations. 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(英语:Heinz Rutishauser). Description of ALGOL 60(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 «arrayp[-4:5,1:50,0:20]», is equivalent to
NUMAL (页面存档备份,存于互联网档案馆) A Library of Numerical Procedures in ALGOL 60 developed at The Stichting Centrum Wiskunde & Informatica (legal successor of Stichting Mathematisch Centrum) legal owner.