ALGOL 60

来自testwiki
imported>InternetArchiveBot2025年2月1日 (六) 04:56的版本 (补救1个来源,并将0个来源标记为失效。) #IABot (v2.0.9.5)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转到导航 跳转到搜索

Template:Infobox programming language ALGOL 60(源自Template:Lang的縮寫),是在1960年創建的称为“算法语言”的一種程式語言。它是以后来称为ALGOL 58的“国际代数语言”为基礎,其官方後繼者是ALGOL 68,它们一起并称为ALGOL語言家族。Algol 60引进了许多新的概念如:词法作用域递归[1]巴科斯-诺尔范式(BNF),它在程式語言设计和发展演化中有著巨大的影響力。

歷史

1960年,在巴黎举行的讨论会上,来自欧洲的诺尔Template:En-linkTemplate:En-linkTemplate:En-link范·韦恩加登Template:En-linkTemplate:En-link,与来自美国的佩利巴科斯麦卡锡Template:En-linkTemplate:En-link和J. Green,共同发表了《算法语言ALGOL 60报告》[2]戴克斯特拉实现了ALGOL 60语言的第一个编译器。在1962年罗马会议上,ALGOL 60报告得到了修订,并于1963年出版[3]

ALGOL 60是程序设计语言发展史上的一个里程碑,影響到其後的SimulaCPLALGOL WISWIMBCPLBPascalCScheme等。它标志着程序设计语言成为一门独立的科学学科,并为后来软件自动化及软件可靠性的发展奠定了基础。

標準

ALGOL 60以及COBOL,是最初的企圖標準化的程式語言。ALGOL60曾經提出兩項ISO標準:

  • ISO 1538: 1984年,编程语言ALGOL 60[4],它已稳固化。
  • ISO 1672: 1977年,ALGOL基本符号的ISO 7位编码字符集硬件表示[5],它已撤消。

实现时间线

ALGOL 60在语言报告中没有I/O设施;诸多实现以少有相互兼容的方式定义了自己的设施。迄今ALGOL 60已经有了至少70个扩充、扩展、派生和子语言[6]

名字 年份 作者 国家 描述 目标CPU
X1 ALGOL 60 1960年8月[7] Edsger W. Dijkstra和Jaap A. Zonneveld Template:Flag 第一个ALGOL 60实现[8] Template:En-link
ALGOL 1960[9] Edgar T. Irons Template:Flag ALGOL 60 Template:En-link
Template:En-link(及一些变体) 1961 Template:En-link(有HoareDijkstra和其他人参与) Template:Flag 以Burroughs(后来基于Unisys Template:En-link)计算机为基础。Burroughs方言包括了特殊系统编程方言比如Template:En-linkTemplate:En-link Template:En-linkTemplate:En-link
Case ALGOL 1961 Template:Flag Simula最初签约为Case ALGOL的模拟器扩展 Template:En-link
GOGOL 1961 William M. McKeeman Template:Flag 用于ODIN分时系统 PDP-1
DASK ALGOL 1961 Peter NaurTemplate:En-link Template:Flag ALGOL 60 Template:En-linkTemplate:En-link
SMIL ALGOL 1962 Torgil Ekman,Carl-Erik Fröberg Template:Flag ALGOL 60 隆德大学Template:En-link
GIER ALGOL 1962 Peter NaurTemplate:En-link Template:Flag ALGOL 60 Template:En-link的GIER
Template:En-link[10] 1962 Template:En-link,Stephen J. Garland,Robert F. Hargraves,Template:En-link,Jorge LLacer Template:Flag ALGOL 60 Template:En-link
Alcor Mainz 2002 1962 Ursula Hill-Samelson,Hans Langmaack Template:Flag Siemens 2002
ALCOR-ILLINOIS 7090 1962[11][12] Manfred Paul,Hans Rüdiger Wiehle,Template:En-linkRudolf Bayer Template:FlagTemplate:Flag ALGOL 60,伊利诺伊大学慕尼黑工业大学的实现,1962年-1964年 IBM 7090
USS 90 ALGOL 1962 L. Petrone Template:Flag
Template:En-link 1962 C. A. R. Hoare Template:Flag 在他的1980年图灵奖演讲中讨论 Template:En-link & Template:En-link
ALGOL 60 1962 Roland Strobel[13] Template:Flag Template:En-link应用数学研究所实现 Zeiss-Rechenautomat ZRA 1
ALGOL 60 1962 Template:En-link,Louis Bolliet[14] Template:Flag 格勒诺布尔计算机科学与应用数学研究所(IMAG)和Bull机器公司 Template:En-link
ALGOL Translator 1962 G. van der Mey,Template:En-link Template:Flag 荷兰国家邮政局,电报电话 Template:En-link
Kidsgrove ALGOL 1963 F. G. Duncan Template:Flag Template:En-linkTemplate:En-link
SCALP[15] 1963 Stephen J. Garland,Template:En-linkTemplate:En-link Template:Flag 作为ALGOL 60子集的自齐备Algol处理器 Template:En-link
VALGOL 1963 Val Schorre Template:Flag Template:En-link编译器的编译器的测试品
FP6000 ALGOL 1963 Template:En-link Template:Flag Template:En-link写作 Template:En-link
Template:En-link 1964[16] Template:En-link,Lawford John Russell Template:Flag 英国电气公司原子能部。以Template:En-link为前提,国家物理实验室ACETemplate:En-link实现。 英国电气公司Template:En-link
ALGOL 60 1964 Jean-Claude Boussard[17] Template:Flag 格勒诺布尔信息与数学应用研究所 IBM 7090
ALGOL-GENIUS 1964 Börje Langefors Template:Flag 增加受COBOL启发的数据记录和I/O Template:En-link D-21
ALGOL 60 1965 Claude Pair[18] Template:Flag 南锡科学学院计算中心 Template:En-link
Dartmouth ALGOL 1965 Stephen J. Garland,Sarr Blumson,Ron Martin Template:Flag ALGOL 60 用于Template:En-linkTemplate:En-link
NU ALGOL 1965 Template:Flag UNIVAC
ALGOL 60 1965[19] F.E.J. Kruseman Aretz Template:Flag 用于EL-X8的MC编译器 Template:En-link
ALGEK 1965 Template:Flag АЛГЭК,基于ALGOL-60并支持COBOL,用于经济任务 Template:En-link
MALGOL 1966 publ. A. Viil,M Kotli,M. Rakhendi Template:Flagicon 爱沙尼亚SSR Template:En-link
DJS-6 ALGOL 1966 Template:Flag 华北计算所 DJS-6
ALGAMS 1967 GAMS组织(ГАМС,中型机器自动化编程小组),协作于Comecon科学院 经济互助委员会 Template:En-link,后来的Template:En-linkTemplate:En-link
ALGOL/ZAM 1967 Template:Flag 波兰ZAM计算机
Template:En-link 1972 Template:Flag DG Template:En-link计算机家族
NASE[20] 1990 Erik Schoenfelder Template:Flag 解释器 Linux和MS Windows
MARST[21] 2000 Andrew Makhorin Template:Flag ALGOL 60到C转换器 GNU编译器套件支持的全部CPU;MARST是GNU计划成员

词法

简单符号

除了字母数字之外,ALGOL定义了运算符

优先级 运算符
第一
算术
第一 (幂)
第二 ×/(实数),÷(整数)
第三 +-
第二 <=>
第三 ¬(非)
第四 (与)
第五 (或)
第六 (蕴涵)
第七 (等价)

Template:En-link:

, . : ;
( ) [ ]

在ISO 1672标准中,用:=表示(U+2254),用*表示×;用%表示÷,用**^表示,用@表示科学记数法指数运算的底数10所用符号(U+23E8),用{表示,并且用}表示,用空格 表示在字符串中的空白字符(U+2423)。

关键字

ALGOL 60有24个关键字

  • array
  • begin
  • Boolean
  • comment
  • do
  • else
  • end
  • false
  • for
  • go to
  • if
  • integer
  • label
  • own
  • procedure
  • real
  • step
  • string
  • switch
  • then
  • true
  • until
  • value
  • while

还包括标准函数名字作为限制标识符:

  • abs
  • sign
  • sqrt
  • sin
  • cos
  • arctan
  • ln
  • exp
  • entier

关键字写法依赖于实现,常见的是一种叫做Template:En-link(stropping)的方法,即将关键字大写并包围在两个'之间,例如将go to写为'GOTO'。在ISO 1672标准中关键字还包括对特定符号的某种文字转写:

符号 转写 符号 转写 符号 转写 符号 转写
[ '(/' ] '/)' '(' ')'
< 'LT' > 'GT' 'LE' 'GE'
= 'EQ' 'EQV' 'NE' ¬ 'NOT'
'AND' 'OR' 'IMPL' ÷ '/'

语义

块与作用域

在ALGOL 60中,“复合语句”被定义为:包围在语句括号beginend之间的成序列的语句,形成一个复合语句。被定义为:成序列的声明,跟随着成序列的语句,并被包围在beginend之间,形成一个块;所有声明以这种方式出现在一个块中,并只在这个块中有效。[22]

一个程序是特定的一个块或复合语句,它不包含在另一个语句之中,并且不使用不包含在它之中的其他语句。在1976年的修改版语言报告中,程序只能包含在叫做“环境块”的假定总是存在的一个虚构块之中,除了可以使用在环境块中声明的过程标识符和函数指定符之外,不使用不包含在它之中的其他语句。

(quantity)被区分出如下种类:简单变量、数组、标签、switchswitch列表由标签组成[23])和过程。声明负担定义在程序中用到的量的特定属性,并给它们关联上标识符。声明包括:类型声明、数组声明、switch声明和过程声明。量的作用域是语句和表达式的集合,在其中关联于这个量的标识符的声明是有效的。所有的块,自动地介入Template:En-link(nomenclature)的一个新的层级:

  • 在这个块内出现的标识符,可以通过合适的声明,而被指定为局部于所论及的这个块。这个标识符在这个块里面的所表示的实体,不存在于它的外面。这个标识符在这个块外面的所表示的任何实体,在这个块里面是不可见的。
  • 除了表示标签的标识符之外,一个标识符,如果出现在一个块中,而且并非声明于这个块中,则它Template:En-link于这个块[24],就是说它在这个块里面和在紧邻其外的层级中所表示的是同一个实体。
  • 因为块中的语句自身可以是一个块,局部和非局部于一个块的概念,必须递归地去理解,就是说非局部于一个块A的一个标识符,可是亦可否地,非局部于A是其中语句的块B

这动态的蕴涵了:在通过begin进入一个块的时候,所有为这个块声明的标识符,假定了这个给定声明的Template:En-link所蕴涵的Template:En-link(significance);如果这些标识符已经被外面的其他声明所定义,这时它们被给予新的意义;在另一方面,并非为这个块声明的标识符,保持它们旧有的含义。在通过endgo to语句退出一个块的时候,为这个块声明的标识符失去它们的局部意义。声明可以标记上额外的声明符own,其效果为:在重新进入一个块的时候,自有的这些量的值将不变更而仍是上次退出时的值,然而声明的没有标记上own的变量的值是未定义的。

表达式和语句

在描述算法处理的程序中,主要构成者是算术表达式、布尔表达式,和得到语句标签的指定(designational)表达式。除了特定的分界符之外,表达式的构成者包括:逻辑值、数值、变量、函数指定式,和基本的算术、关系、逻辑运算符(operator)及顺序运算符。用以形成语句的关键字,在ALGOL 60中被归入顺序运算符和分隔符之中。

变量是对一个单一的指名(Template:En-link)。下标(subscripted)变量指定(designate)多维数组的元素的值,这里将数组元素称为“组成元件”(component)[25]。函数指定式(designator)定义单一的数量值或逻辑值,它们是将给定的由过程声明定义的规则集合,应用于固定的实际参数集合的结果。

现在通常将变量定义为抽象的存储位置,它含有了被称为一个的某种已知或未知的信息,并且配对了关联的Template:En-link名字。在ALGOL 60中,某些语法单位,比如表达式及其构成者和数组标识符,被称为拥有值。各种“类型”即integerrealBoolean指称(denote)的基本的属性。

在左圆括号和匹配的右圆括号之间的表达式(parenthesized expression)自行求值,而这个值被用于后续的计算之中;因此通过适当的圆括号放置,总是可以在表达式之内安排出想要的运算次序

ALGOL 60将语句分为三类:无条件语句、条件语句和for语句。赋值语句担负将表达式的值,指派(assign)到一个或多个变量,或者在定义函数指定式的值的过程主体中指派到过程标识符;在作为指派目标的下标变量中出现的任何下标表达式,先于得出所指派之值的表达式,而按从左至右顺序求值。空无的虚设(dummy)语句不执行任何运算。过程语句负担实施调用一个过程主体的执行。

控制流程语句包括:go to跳转语句、条件语句、for循环语句。go to语句结合了无条件go to和计算go to二者,goto语句不能从块外跳转到块内的标签,但可以跳转进入复合语句。条件语句包括if语句(即if <布尔表达式> then <无条件语句>),和if语句经由关键字else与随后的语句联合在一起的形式(即<if语句> else <语句>)。ALGOL 60在if语句和for语句中介入了子句概念,算术表达式、布尔表达式和指定表达式,可以是条件表达式(即if ~ then ~ else ~[26]

由于变量和函数指定式二者的语法定义都包含表达式,表达式及其构成者的定义必须是递归的。由于成序列的语句,可以被组织成复合语句和块,语句的定义必需是递归的。ALGOL 60采用了左递归巴科斯范式(BNF)。

过程

在ALGOL 60中,过程声明担负定义过程标识符所关联的过程,其主要构成者是过程主体,它是一个语句或一段代码。过程主体总是表现得如同一个块,不管它是否有着块的形式;故而标记了在过程主体内语句或者主体自身的标签的作用域,永远不能延伸超出这个过程主体[27]

过程主体关联着一个头部,它规定了出现在过程主体内的代表形式参数的特定标识符。过程参数传递有两种求值策略传名调用传值调用。在过程声明中,通过对形式参数名字前导value来指定传值调用,缺省为传名调用。在过程主体是用ALGOL语言写的语句的情况下,过程语句执行它的效果,等价于在程序上进行下列操作的效果:

  • 声明为传值调用的形式参数,都要被赋值即指派上对应的实际参数的值,这些指派被认为是在进入过程主体之前显式进行的。其效果如同创建了包围着这个过程主体的一个额外的块,在其中所做的这些指派针对的是局部于这个虚构块的变量,它们具有在相应规定中给出的类型。作为结论,传值调用的变量,被认为Template:En-link于过程主体,但是局部于这个虚构块。
  • 声明为传名调用的形式参数,在整个过程主体内,要被替代为对应的实际参数,并且只要语法上可能就对这些实际参数包围上圆括号。在通过这个名字替代处理而插入的标识符,和已经存在于过程主体之内的其他标识符,二者之间的可能冲突,将凭借对涉及到的(这个过程主体的)形式标识符或局部标识符的适合的系统性变更来避免[28]
  • 最终经过上述修改后的过程主体,被插入到过程语句的位置上并被执行。如果调用这个过程的位置,处在这个过程主体的任何非局部量[29]作用域的外面,在通过这个过程主体替代处理而插入的标识符,和在这个过程语句或函数指定式所在位置上其声明有效的标识符,二者之间的可能冲突,将通过(在发起调用的这个层级上)对后者标识符的适合的系统性变更来避免[30]

对于定义函数指定式的值的过程声明,在其过程主体中,必须出现具有过程标识符在其左侧部份中的一个或多个赋值语句,其中至少有一个必须被执行;并且这个过程标识符所关联的类型,必须通过以类型声明符作为其过程声明的最先符号的样貌来声明。最后那个这样指派的值,被用来继续此函数指定式在其中出现的表达式的求值。在这个过程主体中,这个过程标识符的不在赋值语句左侧部份中的任何出现,指示了这个过程的激活(activation)。

两个传名调用形式参数,其对应的实际参数之间可能存在依赖关系,比如第一个是整数变量i,而第二个是下标变量A[i],从而导致后者形式参数也依赖于前者形式参数,利用传名调用和这种副作用可以实现Template:En-link[31];它典型的用于定义对应于 k=uak 级数过程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年Template:En-linkTemplate:En-link制定了《SUBSET ALGOL 60报告》,在这个子集语言中对“完全的名字概念”(full name-concept)增加了一项限制:在名字替代(传名调用)中,实际参数只能是一个标识符或字符串。

在过程的参数列表( … <参数分界符> … )中,有可选的“) <字母串>: (”样式的参数Template:En-link[32]。众所周知的传名调用实现采用了Template:En-linkTemplate:Efn[33]Donald Knuth设计了“男人抑或男孩测试”,来区分编译器是否正确的实现了“递归和非局部引用”,这个测试用到了传名调用。

例子

下面是语言报告中过程声明的一个例子Template:Efn

procedure Absmax(a) Size:(n, m) Result:(y) Subscripts:(i, k);
    value n, m; array a; integer n, m, i, k; real y;
    comment 矩阵a,其大小为nm,其绝对值最大的
        元素被传送到y,并且这个元素的下标是ik ;
begin
    integer p, q;
    y := 0; i := k := 1;
    for p := 1 step 1 until n do
        for q := 1 step 1 until m do
            if abs(a[p, q]) > y then
            begin
                y := abs(a[p, q]);
                i := p; k := q
            end
end Absmax

在1976年修改版语言报告的环境块中,定义了输入输出过程:incharoutcharlengthoutstringoutterminatorinintegeroutintegerinrealoutreal,下面以其中的outinteger作为演示例子:

procedure outinteger(channel, int);
    value channel, int;
    integer channel, int;
    comment 将表示int的值的那些字符
        加上尾随的终结符传递到channel ;
begin
    procedure digits(int);
        value int; integer int;
    begin
        integer j;
        comment 使用递归从右至左求值数字 
            但从左至右打印它们 ;
        j := int ÷ 10;
        int := int - 10 × j;
        if j  0 then
            digits(j);
        outchar(channel, 0123456789, int + 1)
    end digits;
    if int < 0 then
    begin
        outchar(channel, -, 1);
        int := -int
    end;
    digits(int); outterminator(channel)
end outinteger

这里调用到的outchar(channel, str, int),将在字符串str中对应整数int的值的那个字符,传递到通道channeloutterminator(channel),用于输出在数值之后的终结符(即空格、换行或分号)。此外,Template:En-linkTemplate:En-link在1964年曾制定《ALGOL 60输入输出过程报告》,其中定义了insymboloutsymbollengthinrealoutrealinarrayoutarray,这里的多维数组採用了Template:En-link(Row major)次序[34]

参见

Template:Div col

Template:Div col end

注释与引用

Template:Reflist Template:Reflist

外部链接

Template:Authority control

Template:程序设计语言

  1. Template:Cite web
  2. Template:Cite journal
  3. Template:Cite web
  4. Template:Cite web
  5. Template:Cite web
  6. The Encyclopedia of Computer Languages Template:Webarchive
  7. Template:Cite journal
  8. Template:Cite book
  9. Template:Cite web
  10. Template:Cite web
  11. Template:Cite journal
  12. Template:Cite journal
  13. Rechenautomaten mit Trommelspeicher Template:Wayback, Förderverein der Technischen Sammlung Dresden
  14. Template:Cite journal
  15. Template:Cite
  16. Template:Cite web
  17. Template:Cite thesis
  18. Template:Cite journal
  19. Template:Cite book
  20. Template:Cite web
  21. Template:Cite web
  22. Template:Cite web
  23. Template:Cite web
    Template:Cite web“25.4.3.

     
    «

    begin
        switch wernik := ariea, aeryl, m17, larix;
        goto wernik[k];
    arica: ; comment this for k = 1 ;
        
        goto common;
    aeryl: ; comment this for k = 2 ;
        
        goto common;
    m17: ; comment this for k = 3 ;
        
        goto common;
    larix: ; comment this for 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.”

  24. Template:Cite web“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=01f(x,y)dx
    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=01f(x,2.75)dx
    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.”
  25. Template:Cite web“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.”
  26. Template:Cite web
    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».”
  27. Template:Cite web“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. ……”
  28. Template:Cite web“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 , after which we obtain the equivalence block correctly as
      «begin real zæ; zæ := 2 × z; z := z / zæ end».”

  29. Template:Cite web“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.”
  30. Template:Cite web“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.”

  31. Template:Cite web
  32. Template:Cite web
  33. Template:Cite journal
  34. Template:Cite web“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])
    

    ».”