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:
“Undoubtedly we have not questions to ask which are unanswerable. We must trust the perfection of the creation so far, as to believe that whatever curiosity the order of things has awakened in our minds, the order of things can satisfy. Every mans condition is a solution in hieroglyphic to those inquiries he would put. He acts it as life, before he apprehends it as truth.”
—Ralph Waldo Emerson (18031882)
“In Russia there is an emigration of intelligence: émigrés cross the frontier in order to read and to write good books. But in doing so they contribute to making their fatherland, abandoned by spirit, into the gaping jaws of Asia that would like to swallow our little Europe.”
—Friedrich Nietzsche (18441900)
“Those who govern, having much business on their hands, do not generally like to take the trouble of considering and carrying into execution new projects. The best public measures are therefore seldom adopted from previous wisdom, but forced by the occasion.”
—Benjamin Franklin (17061790)