Content deleted Content added
→Implementation issues: grammar |
m →=== Nested functions ===: fixed typo |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1:
{{Short description|In computer programming, a variable which is not defined in the local scope}}
{{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 In [[Lua (programming language)|Lua]] they are called the ''upvalues'' of the function.<ref>''[http://www.lua.org/pil/contents.html Programming in Lua (first edition)],'' "[http://www.lua.org/pil/27.3.3.html 27.3.3 – Upvalues]"</ref>
Line 16 ⟶ 19:
</syntaxhighlight>
In
<syntaxhighlight lang="javascript">
function outer() {
Line 44 ⟶ 47:
==Notes==
{{reflist}}
== References ==
* Aho, Lam, Sethi, and Ullman. "7.3 Access to Nonlocal Data on the Stack". ''[[Compilers: Principles, Techniques, & Tools]]''. Second edition.
|