Repeat the previous exercise for a central reference table. Data From Previous Exercises: Show a trace of

Question:

Repeat the previous exercise for a central reference table.

Data From Previous Exercises:

Show a trace of the contents of the referencing environment A-list during execution of the program in

(a) Figure 3.9. Assume that a positive value is read at line 8.

Figure 3.9:

1. n: integer -- global declaration 2. procedure first() 3. n:= 1 4. procedure second() n: integer 5. -- local declaration 6. first() 7. n:= 2 8. if read.integer() > 0 9. second() 10. else 11. first() 12. write.integer(n)

(b) Exercise 3.14.

Data From Exercise 3.14:

Consider the following pseudocode:
What does this programprint if the language uses static scoping? What does it print with dynamic scoping? Why?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: