Module 0232: Subroutine tracing

Tak Auyeung, Ph.D.

December 2, 2010
1 About this module
2 Adding column identification
3 Subroutine invocation and returning
 3.1 Basic subroutine control flow
 3.2 Multiple invocation
 3.3 Invoke from a subroutine
 3.4 Invoke from self
4 Local variables
 4.1 Basic local variable
 4.2 Local variables of the same name (in different subroutines)
 4.3 Local variables in a recursive subroutine
5 By value parameters
 5.1 Basic byval parameter
 5.2 Byval parameter in a recursive subroutine
6 By reference parameters
 6.1 Basic byref parameter
 6.2 Byref parameter passed by reference again
 6.3 What can be passed by reference?
7 Returning values
 7.1 A simple case of returning a value
 7.2 Invoke in an invoke
 7.3 Return to a return
 7.4 Returning in an actual programming language
 7.5 What if there is no “return”?