Due 4:00 PM, Tuesday Jan. 14, 2014

### The purpose of reading exercises

• They ensure that students have read the assigned material before class. The instructor does not have the time to cover all the topics in the reading. Instead he wishes to use class time to discuss important issues more deeply. If students have not done the reading they cannot participate meaningfully in the discussions, and class time is wasted.
• The reading exercises serve as a guide to what is in the reading. Thus the student may better appreciate the reading.

### How to complete a reading exercise

• Read through the exercise first, to get an idea of what you are supposed to get out of the reading. If you know what you are looking for, you'll get more out of the reading.
• When you have finished the whole reading go back and fill in the answers.

### How to turn in a reading exercise

To turn in an exercise, repeat each question along with your answers. You might do this by cutting and pasting from the exercise, or by printing it out, and writing your answers on the printout, and then scanning your result into a PDF that you can submit via the drop box function of D2L. Submit only *.txt or *.pdf or *.html documents to D2L. It is your responsibility that exercises are in the correct formats.

### Content of reading exercise #1

1. Compare and contrast the information contained in precedence and associativity rules with the information contained in order of evaluation rules for expressions.
2. Compare and contrast iteration and logically controlled loops.
3. List the control flow mechanisms. Some control flow mechanisms are used predominately in Imperative, Functional, and Logic languages. For each type of language list the control flow mechanisms most commonly associated with that type of language.
4. What are the differences between a value-model of variables and a reference model of variables?
5. Why do many languages leave the order of evaluation of the arguments to functions unspecified?
6. Describe 3 different search strategies that might be used to implement a case statement. Describe the circumstances where each would be desirable.
7. What is tail recursion? Why is it important?
8. How does lazy evaluation differ from normal order evaluation?
9. Why is initialization of variables important? In some languages it is either hard (or expensive) to tell if a variable has been initialized when it is used. Why?