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: Recursion (computer Science)
Famous quotes containing the words order of, order and/or execution:
“If we are the younger, we may envy the older. If we are the older, we may feel that the younger is always being indulged. In other words, no matter what position we hold in family order of birth, we can prove beyond a doubt that were being gypped.”
—Judith Viorst (20th century)
“When a person hasnt in him that which is higher and stronger than all external influences, it is enough for him to catch a good cold in order to lose his equilibrium and begin to see an owl in every bird, to hear a dogs bark in every sound.”
—Anton Pavlovich Chekhov (18601904)
“The application requisite to the duties of the office I hold [governor of Virginia] is so excessive, and the execution of them after all so imperfect, that I have determined to retire from it at the close of the present campaign.”
—Thomas Jefferson (17431826)