Example for stack and variable store diagrams.


declare
X = 1
Y
proc {F Z} if X == Z then Y = 2 else Y = 3 end end
%%% 1: Show the stack and the variable store 
local Y in
   %%% 2: Show the stack and the variable store 
   Y = 5
   {F Y} %%% 3: Show the stack and the store as the function begins execution
end
%%% 4: Show the stack and the variable store
%%% What will be printed? 
{Browse Y}

CSci 4651 course web site.