CS251: Programming Languages
Homework 2
Due Thursday, February 11
This homework covers Chapter 3 of the MacLennan text (Algol-60) as
well as the paper by Naur entitled, "REPORT ON THE ALGORITHMIC
LANGUAGE ALGOL 60" (1963) (pages 44-60 of the Grand Tour book).
Do problems 1, 2, 3, 4, 6 and 7. Problem 5 counts as extra credit.
- MacLennan 3.9 (p. 118)
- MacLennan 3.25 (p. 142) (Hint: It is simpler than it may
seem... You can assume that you have the definition of the fac
procedure from p. 136)
- MacLennan 3.27 (p. 145)
- MacLennan 3.28 (p. 147)
- (extra credit) MacLennan 3.8 (p. 151)
- MacLennan 3.10 (p. 151) Add the following case:
e) x is passed by reference and y is passed by reference.
- What sentence in the Naur paper allows recursion? (Hint: It
does not mention the word "recursion"; instead it describes an
operation that could lead to recursion.)