Last update November 15, 2003

DWiki /
Nested Functions



Difference (previous author) (Change, Edit, normal page display)

Changed: 1c1,23
Describe the new page here.
Functions may be nested within other functions:

int bar(int a)
{
int foo(int b)
{
int abc() { return 1; }
return b + abc();
}
return foo(a);
}

void test()
{
int i = bar(3); // i is assigned 4
}

See also /FunctionLiterals.





(From DWiki)

Functions may be nested within other functions:

int bar(int a)

 {
    int foo(int b)
    {
	int abc() { return 1; }
	return b + abc();
    }
    return foo(a);
 }

void test()
 {
    int i = bar(3);	// i is assigned 4
 }

See also /FunctionLiterals.


(From DWiki)

FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: November 15, 2003 5:50 (diff))