Home » Programming » 07 - Subprograms
7

Activation Records and Recursive Subprograms

Whenever a subprogram is called, an activation record is made. A recursive subprogram is basically a program that calls itself.

Activation Records

Whenever a subprogram is called, an activation record is made. While the program is executing, the contents of the activation record change. The records are destroyed once the subprogram finishes.

Recursive Subprograms

A recursive subprogram is basically a program that calls itself. The recursive call makes a second activation of the subprogram during the lifetime of the first activation. Try using recursive subprogramming in your Visual Basic Editor. Try calling the multiplier function within a multiplier function. See what happens. What is the value generated in the message box?