Closures/Value capture: Difference between revisions

These tasks, Multiple distinct objects and Closures/Value capture, have some similarities
m (used a different font for (italic) lowercase "i".)
(These tasks, Multiple distinct objects and Closures/Value capture, have some similarities)
Line 13:
 
For each function to maintain the correct number, it has to capture the ''value'' of the variable at the time it was created, rather than just a reference to the variable, which would have a different value by the time the function was run.
 
<br><br>
See also: [[Multiple distinct objects]]
 
=={{header|Ada}}==
1,707

edits