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 of, order and/or execution:
“There is no explanation for evil. It must be looked upon as a necessary part of the order of the universe. To ignore it is childish, to bewail it senseless.”
—W. Somerset Maugham (18741965)
“The confusion of emotions with behavior causes no end of unnecessary trouble to both adults and children. Behavior can be commanded; emotions cant. An adult can put controls on a childs behaviorat least part of the timebut how do you put controls on what a child feels? An adult can impose controls on his own behaviorif hes grown upbut how does he order what he feels?”
—Leontine Young (20th century)
“It is clear that in a monarchy, where he who commands the exceution of the laws generally thinks himself above them, there is less need of virtue than in a popular government, where the person entrusted with the execution of the laws is sensible of his being subject to their direction.”
—Charles Louis de Secondat Montesquieu (16891755)