Nested function: Difference between revisions

m
added whitespace.
m (→‎{{header|REXX}}: used the separator as per task requirements.)
m (added whitespace.)
Line 1:
{{task}}
[[Category:Scope]][[Category:Functions and subroutines]]
 
In many languages, functions can be nested, resulting in outer functions and inner functions. The inner function can access variables from the outer function. In most languages, the inner function can also modify variables in the outer function.
 
'''The Task'''
 
;Task:
Write a program consisting of two nested functions that prints the following text.
 
Line 15 ⟶ 16:
The inner function (called <tt>MakeItem</tt> or equivalent) is responsible for creating a list item. It accesses the separator from the outer function and modifies the counter.
 
'''References:'''
 
''';References:'''
:* [[wp:Nested function|Nested function]]
<br><br>
 
[[Category:Scope]][[Category:Functions and subroutines]]
 
=={{header|Ada}}==