Order of Execution
In a recursive function, the position in which additional statements (i.e., statements other than the recursive call itself) are placed is important. In the simple case of a function calling itself only once, a statement placed before the recursive call will be executed first in the outermost stack frame, while a statement placed after the recursive call will be executed first in the innermost stack frame. Consider this example:
Read more about this topic: Recursive Call
Famous quotes containing the words order and/or execution:
“It is only because a person has volitions of the second order that he is capable both of enjoying and of lacking freedom of the will.”
—Harry Gordon Frankfurt (b. 1929)
“My weakness has always been to prefer the large intention of an unskilful artist to the trivial intention of an accomplished one: in other words, I am more interested in the high ideas of a feeble executant than in the high execution of a feeble thinker.”
—Thomas Hardy (18401928)