Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
compare webbrowser
Freenet DSL
Who's Online
9 user(s) are online (8 user(s) are browsing encyclopedia)

Members: 0
Guests: 9

more...
browser tip
Unix Befehle
manual of unix befehle
recommendation!
Sponsored
partner

Nested function

A nested function is a function (programming) which can only be called from its parent function. That is, the scope (programming) of the nested function is limited to the current function only. For instance, D programming language supports nested functions:

int foo(int x) { int bar(int y) { return x + y; } return bar(3); }

In this case bar is a nested function for foo and can only be called from within foo.

Nested functions are useful for creating code blocks that must remain logically separate but are only useful for a specific function as opposed to the entire module or program.

  • Other languages supporting nested functions/methods are Ruby programming language, Python programming language, and Pascal programming language.
  • = See also =

    *Circular reference