Analysis of information sources in references of the Wikipedia article "ALGOL 60" in Chinese language version.
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.
|
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.”
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
. ……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
. ……B
fall into the following four categories:B
and switches which are declared outside B
. ……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 resultx
, 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. ……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 hyperboxlk ≤ ik ≤ uk
(k = 1, 2, ……, p
),l1, l2 ……, lp, u1, u2, ……, up
) are given in the corresponding array declaration ……. ……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
.”x + (if t > t1 then 1 else -1) / x
».+ if
» is always illegal).a[if k > n then n else if k < 1 then 1 else k]
».if (if u then x else y) > 0 then (if z = 0 then x + y else x - y) else x × y
».”S
stands for the procedure body - is defined as the constructionbegin real æ; S end
»1, 2.æ
serves solely to make this piece of program a block.S
is already an unlabelled block, this artificial construction is unneeded and we could take S
instead. ……”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
».”
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
.
|
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.”
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.
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
.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])
|
».” |
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.
|
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.”
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
. ……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
. ……B
fall into the following four categories:B
and switches which are declared outside B
. ……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 resultx
, 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. ……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 hyperboxlk ≤ ik ≤ uk
(k = 1, 2, ……, p
),l1, l2 ……, lp, u1, u2, ……, up
) are given in the corresponding array declaration ……. ……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
.”x + (if t > t1 then 1 else -1) / x
».+ if
» is always illegal).a[if k > n then n else if k < 1 then 1 else k]
».if (if u then x else y) > 0 then (if z = 0 then x + y else x - y) else x × y
».”S
stands for the procedure body - is defined as the constructionbegin real æ; S end
»1, 2.æ
serves solely to make this piece of program a block.S
is already an unlabelled block, this artificial construction is unneeded and we could take S
instead. ……”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
».”
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
.
|
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.”
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.
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
.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])
|
».” |
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.
A sequence of statements may be enclosed between the statement bracketsbegin
andend
to form a compound statement. ……
A sequence of declarations followed by a sequence of statements and enclosed betweenbegin
andend
constitutes a block. Every declaration appears in a block in this way and is valid only for that block.
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.
|
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.”
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.
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.
A sequence of statements may be enclosed between the statement bracketsbegin
andend
to form a compound statement. ……
A sequence of declarations followed by a sequence of statements and enclosed betweenbegin
andend
constitutes a block. Every declaration appears in a block in this way and is valid only for that block.
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.
|
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.”
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
. ……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
. ……B
fall into the following four categories:B
and switches which are declared outside B
. ……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 resultx
, 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. ……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 hyperboxlk ≤ ik ≤ uk
(k = 1, 2, ……, p
),l1, l2 ……, lp, u1, u2, ……, up
) are given in the corresponding array declaration ……. ……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
.”x + (if t > t1 then 1 else -1) / x
».+ if
» is always illegal).a[if k > n then n else if k < 1 then 1 else k]
».if (if u then x else y) > 0 then (if z = 0 then x + y else x - y) else x × y
».”S
stands for the procedure body - is defined as the constructionbegin real æ; S end
»1, 2.æ
serves solely to make this piece of program a block.S
is already an unlabelled block, this artificial construction is unneeded and we could take S
instead. ……”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
».”
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
.
|
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.”
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.
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.
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
.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])
|
».” |
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.
|
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.”
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
. ……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
. ……B
fall into the following four categories:B
and switches which are declared outside B
. ……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 resultx
, 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. ……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 hyperboxlk ≤ ik ≤ uk
(k = 1, 2, ……, p
),l1, l2 ……, lp, u1, u2, ……, up
) are given in the corresponding array declaration ……. ……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
.”x + (if t > t1 then 1 else -1) / x
».+ if
» is always illegal).a[if k > n then n else if k < 1 then 1 else k]
».if (if u then x else y) > 0 then (if z = 0 then x + y else x - y) else x × y
».”S
stands for the procedure body - is defined as the constructionbegin real æ; S end
»1, 2.æ
serves solely to make this piece of program a block.S
is already an unlabelled block, this artificial construction is unneeded and we could take S
instead. ……”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
».”
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
.
|
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.”
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.
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
.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])
|
».” |