Content deleted Content added
added short description, links Tags: Mobile edit Mobile app edit iOS app edit |
m →=== Nested functions ===: fixed typo |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1:
{{Short description|
{{More citations needed|date=January 2025}}
In [[programming language theory]], a '''non-local variable''' is a variable that is not defined in the local [[Scope (computer science)|scope]]. While the term can refer to [[global variable]]s, it is primarily used in the context of [[nested function|nested]] and [[anonymous function]]s where some variables can be in neither the [[local scope|local]] nor the [[global scope]].
Line 18 ⟶ 19:
</syntaxhighlight>
In
<syntaxhighlight lang="javascript">
function outer() {
Line 46 ⟶ 47:
==Notes==
{{reflist}}
== References ==
* Aho, Lam, Sethi, and Ullman. "7.3 Access to Nonlocal Data on the Stack". ''[[Compilers: Principles, Techniques, & Tools]]''. Second edition.
|