In computer programming, a nested function (or nested procedure/subroutine) is a function which is lexically (textually) encapsulated within another function. It can only be called by the enclosing function or by functions directly or indirectly nested within the same enclosing function. In other words, the scope of the nested function is limited by the enclosing function. The nesting is theoretically possible to any level of depth, although only a few levels are normally used in practice.
Read more about Nested Function: An Example, Purpose, Languages, Implementation
Famous quotes containing the words nested and/or function:
“I was asking for something specific and perfect for my city,
Whereupon lo! upsprang the aboriginal name.
Now I see what there is in a name, a word, liquid, sane, unruly,
musical, self-sufficient,
I see that the word of my city is that word from of old,
Because I see that word nested in nests of water-bays, superb,
Rich, hemmd thick all around with sailships and steamships, an
island sixteen miles long, solid-founded,”
—Walt Whitman (18191892)
“Uses are always much broader than functions, and usually far less contentious. The word function carries overtones of purpose and propriety, of concern with why something was developed rather than with how it has actually been found useful. The function of automobiles is to transport people and objects, but they are used for a variety of other purposesas homes, offices, bedrooms, henhouses, jetties, breakwaters, even offensive weapons.”
—Frank Smith (b. 1928)