< previous page page_1134 next page >

Page 1134
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif 3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
Tail Recursion A recursive algorithm in which no statements are executed after the return from the recursive call.
Figure 19-4 shows the execution of the Print function with the values of the actual parameters for each call. Notice that the array gets smaller with each recursive call (list[first]list[last]). If we want to print the array elements in reverse order recursively, all we have to do is interchange the two statements within the If statement.
1134-01.gif
Figure 19-4
Execution of 
Print(list, 0, 4)

 
< previous page page_1134 next page >