Augustana University College

COMPUTING SCIENCE 370
Programming Languages


Algol Exercises



For Loops

Try to predict in advance what each of the for loops in these Algol60 programs does. Then run the files using the a60 compiler on Berio to test your hypotheses.

. for.a60

. for_sum.a60

. for_example.a60

Call by Name

The next two Algol60 programs illustrate call-by-name parameter passing. In the first example, predict how many times the line 'one called' will be printed.

. callbyname.a60

. param_passing.a60

Copyright © 2003 Jonathan Mohr