4.3 Multiple invocation trace

The trace of this algorithm is in table 2.


Table: A trace of algorithm 2.
line #   comments
4   first line out of a subroutine
5 abc subroutine ``abc'' stores the line # to return to
  return line #  
  6 the line to return to is 6
2   the only line in the subroutine to execute
3 return we are ready to return, use the stored return line #
6 abc subroutine ``abc'' is now invoked a second time. The column that stores the return line number is reconstructed
  return line #  
  7 this time, the line to return to is 7
2    
3 return we are ready to return, use the stored return line #
7   now we are back to the invoker's (caller's) code


Copyright © 2006-10-12 by Tak Auyeung