Talk:ALGOL 60

OR and AND representations
Could someone check for the corresponding symbols of OR and AND in this language, and also their respective priority? Thanks. Teuxe (talk) 14:02, 23 November 2012 (UTC)
 * According to Algol Compilation and Assessment (B.A. Wichmann, 1973), and following the standard notations provided in Boolean algebra (logic), it appears that only the interpretation (and) and (or) of the symbols was incorrect in the Standard Operators table. Now fixed. Teuxe (talk) 14:16, 23 November 2012 (UTC)

External links modified
Hello fellow Wikipedians,

I have just modified 3 one external links on ALGOL 60. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
 * Added archive https://web.archive.org/web/20110927014141/http://hopl.murdoch.edu.au/showlanguage.prx?exp=1807 to http://hopl.murdoch.edu.au/showlanguage.prx?exp=1807
 * Added archive https://web.archive.org/web/20100616084711/http://hopl.murdoch.edu.au:80/showlanguage.prx?exp=7288&language=Chinese%20Algol to http://hopl.murdoch.edu.au/showlanguage.prx?exp=7288&language=Chinese%20Algol
 * Added archive https://web.archive.org/web/20111110061442/http://thor.cs.ucsb.edu/~ravenben/papers/coreos/Hoa81.pdf to http://thor.cs.ucsb.edu/~ravenben/papers/coreos/Hoa81.pdf

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at ).

Cheers.— InternetArchiveBot  (Report bug) 05:10, 1 October 2016 (UTC)

External links modified
Hello fellow Wikipedians,

I have just modified 3 external links on ALGOL 60. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
 * Added archive https://web.archive.org/web/20100209040840/http://www.engin.umd.umich.edu/CIS/course.des/cis400/index.html to http://www.engin.umd.umich.edu/CIS/course.des/cis400/index.html
 * Added archive https://web.archive.org/web/20100204112923/http://www.engin.umd.umich.edu/CIS/course.des/cis400/algol/hworld.html to http://www.engin.umd.umich.edu/CIS/course.des/cis400/algol/hworld.html
 * Added archive https://web.archive.org/web/20100525044658/http://www.cs.ncl.ac.uk/publications/books/papers/124.pdf to http://www.cs.ncl.ac.uk/publications/books/papers/124.pdf

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

Cheers.— InternetArchiveBot  (Report bug) 10:19, 15 December 2017 (UTC)

ALCOR-ILLINOIS 7090 ALGOL Compiler
Just to let people know that I will in a few days add a new entry to the table: The ALCOR-ILLINOIS 7090 ALGOL Compiler. Started in 1962 in Illinois and completed in 1964 in Munich, Germany. I have two references, one is: Gries, Paul, and Wiehle. Some techniques used in the ALCOR-Illinois 7090. Comm. ACM 8 (August 1965), 496-500. It's strange but I didn't see this webpage all these years. David Gries DavidGries (talk) 13:05, 19 January 2018 (UTC)

Introductions to ALGOL 60 in 1960s

 * --89.25.210.104 (talk) 19:59, 22 September 2018 (UTC)
 * --89.25.210.104 (talk) 19:59, 22 September 2018 (UTC)


 * The author needs to be named in the reference, but it would be better to put these citations in the article, not the talk page, unless they need discussion before they're included. --Northernhenge (talk) 00:07, 24 September 2018 (UTC)
 * The author needs to be named in the reference, but it would be better to put these citations in the article, not the talk page, unless they need discussion before they're included. --Northernhenge (talk) 00:07, 24 September 2018 (UTC)

Clarify how Algo60 "allowed for" call by name and call by value
I've added a request for clarification to the discussion of call by name in the "Properties" section. To clarify this request: when the text says that Algol 60 "allowed for" both call by name and call by value, does this mean that a conforming implementation could choose to provide one or the other? Or does it mean that the language provided some mechanism whereby a programmer could choose one evaluation strategy or the other (e.g. by declaring or calling the procedure in a particular way?) VoluntarySlave (talk) 00:23, 10 November 2018 (UTC)


 * Algol 60 had both call by name and call by value as required components of the language. The verb "allowed" is inappropriate unless it is understood to mean that this was always available. I am not sure where to find a citation to support this view, but quite frankly in all the years I have heard about Algol-60, I have never heard anyone make a claim that both were not required features of the language, so I am skeptical that there would be any authoritative citation to clarify this because no one thought it was a question.
 * It's like saying C++ "allows for both call by value and call by reference." C++ has both and both are required of every conforming implementation.
 * The parallel between Algol-60 and C++ extends to the fact that each language has a default parameter passing mechanism and a second parameter passing mechanism that has to be explicitly declared or the default will be used. In Algol-60 the default is call by name; if call by value is desired the qualifier 'value' has to be explicitly stated to override the default. In C++ the default is call by value; if call by reference is desired the qualifier 'var' has to be explicitly stated. (Ksbooth (talk) 06:27, 28 February 2024 (UTC))

I updated the section; it was specified as part of the procedure declaration, as in procedure foo(v, n)  value v;  integer v, n;  — Preceding unsigned comment added by 173.76.121.238 (talk) 00:30, 19 February 2020 (UTC)

There are no reserved word in ALGOL 60
There are no reserved words in ALGOL 60. ALGOL 60 does not describe ALGOL 60 itself, but rather a set of implementations by Burroughs. Shmuel (Seymour J.) Metz Username:Chatul (talk) 16:27, 4 January 2021 (UTC)

Indeed. And the concept of stropping is not mentioned once.

Dates for CDC and IBM
Does anybody have the dates for ALGOL 60 under SCOPE on the CDC 6600 and OS/360 on the IBM System/360? --Shmuel (Seymour J.) Metz Username:Chatul (talk) 11:33, 4 January 2022 (UTC)

Associativity of operators?
Could someone please address associativity as well?

2601:1C2:881:3630:B49F:BCD4:797C:7F32 (talk) 16:50, 10 September 2022 (UTC) A Nony Mouse

What are these single quotes ("'") for?
In the 2nd to last code sample (Hello World for Elliott 803 Algol (A104)) there are 3 single quotes, each at the end of a line.

It is not clear to me what they are for.

My updated understanding suggests they could be stropping, but I remain stumped about these precise usages.

2601:1C2:881:3630:B49F:BCD4:797C:7F32 (talk) 00:48, 11 September 2022 (UTC) A Nony Mouse

Dangling IF?
Should there be a description of the "dangling IF" issue in ALGOL 60? -- Shmuel (Seymour J.) Metz Username:Chatul (talk)

Example of an Algol-60 swap procedure
In the "Properties" section the discussion of how to write an Algol-60 procedure that swaps the values in its two arguments seems incomplete and confusing. Specifically, it says "For example, without specifying the parameters as value or reference, it is impossible to develop a procedure that will swap the values of two parameters if the actual parameters that are passed in are an integer variable and an [integer] array that is indexed by that same integer variable." I do not understand why call by reference is included. Algol-60 does not have call by reference.

If the claim is about languages in general (not just Algol-60) then I think it makes no sense because call by value cannot work. Call by reference will work but this brings into question why it is required to specify call by reference in languages for which call by reference is the default (or perhaps the only) parameter passing mechanism, especially if there is no way to explicitly specify call by reference.

At the very least, I think this needs clarification. But it would be even better to actually describe how to implement swap(x,y) in Algol-60 for the example of an integer argument and an integer array indexed by the integer argument.

In Algol-60, a swap procedure will have to use call by name (as mentioned above, call by value never works), which is the default parameter passing mechanism and thus does not need to be explicitly specified.

The obvious code for the body of the swap procedure is the following.

begin t := x;  x := y;   y := t; end

This does not work in Algol-60 for a swap(x,y) function definition for reasons that I think are well known. The discussion of passing a pointer to the swap procedure and swapping i and A[i] is waltzing around the solution, but does not actually describe the solution.

The standard solution is to include a "helper" procedure (actually a helper function) and then have the main body of the swap procedure be just a single assignment that invokes the helper function swap1 declared local to swap and thus invisible to the rest of the program. The correct code for the body of the swap procedure is the following.

begin x := swap1( x, y ); end

where swap1 is an integer-valued function that returns the current value of y but as a side effect sets y to be the current value of x.

Code for the body of the swap1 function is the following.

begin swap1 := y;  y := x; end

The problem with the obvious code is that swap(i,A[i]), where i = 1 and A[1] = 2, is that t becomes 1, then x (which is i in the calling procedure) becomes 2, and then the final assignment puts a 1 into y but y is A[i] and i now has the value 2 so A[2] becomes 1 (clobbering whatever was there before) and A[1] is unchanged and is still 2 even though it should now be 1. Changing the code to save y in t instead of x works for this example but fails for swap(A[i],i).

The standard solution works for swap(A[i],i) as follows, and relies on the fact that in an assignment statement the LHS (the object that will be assigned to) is evaluated before the RHS (the expression that will be the new value) to produce an l-value (essentially an address or location, think "ref" in the C++ sense). So the assignment statement figures out the location for x in the calling procedure (i for the swap(i,A[i]) example, but A[1] if the arguments are reversed), then the swap1 function is invoked and it remembers the value of y that it will return (2 in this case), then y is assigned 1, and the 2 is returned and stored in i. What has changed is that the value of i is never modified until after all of the uses of A[i] have determined the l-values (locations) for assignments.

Without the swap1 trick, as soon as i is modified, A[i] may refer to a different element of the array A and thus a different location in memory and hence its contents could be anything at all depending on what i was.

Looking on the web, there seem to be a number of places that make the claim that in Algol-60, swap(x,y) cannot be implemented to work correctly in every case if the parameter passing mechanism is call by name. This is true, but as the solution above demonstrates it can be done for swap(A[i],i) example.

A more general discussion is provided in

A. C. Fleck. On the impossibility of content exchange through the by-name parameter transmission mechanism. SIGPLAN Not., 11:38–41, November 1976. https://dl.acm.org/doi/10.1145/987335.987339

where the solution above is discussed and shown to work for the swap(A[i],i) example, but a more elaborate example where one of the arguments is a procedure that has side effects is shown to fail because computing the l-value for x changes a variable that is used to determine either x or y and thus ends up not doing what is expected (not swapping). The article offers an "informal proof" that there is no swap procedure guaranteed to always work, but if we do not allow procedure evaluations within subscript expressions, the solution given above will work.

Unfortunately, I think the restriction needs to be better phrased because A[A[i]] (for example) can be an argument and the solution will work, but the subscript A[i] is (technically) evaluated using a "thunk" and that is a procedure, albeit a compiler-generated procedure and one that does not have side effects. So the restriction disallows some examples that will work.

Ksbooth (talk) 07:37, 28 February 2024 (UTC)