Exam Prep Sheet, 5. b)

I´m wondering whether there is a little typo in the solution of ex. 5 b):


And I would like to ask why the value of z is the undefinded value in row 7 of the Execution trace.



Yes, you’re right. The σ is also slightly misplaced at several positions (it is part of the respective L/R evaluation, and shouldn’t be outside of the parentheses).

That is another error. It shouldn’t change during the assignment.

Thanks, we will fix this!

It is fixed now. Another error in the solution was that the wrong environments where used: At the point where the pointer expressions are evaluated the concerned environment is not \sigma anymore. The way to handle that is to define a new variable for the modified environment (see updated solution).

1 Like