lexical scope
lexical scope
(programming)This contrasts with dynamic scope where the scope depends onthe nesting of procedure and function calls at run time.
Statically scoped languages differ as to whether the scope islimited to the smallest block (including begin/end blocks)containing the identifier's declaration (e.g. C, Perl) orto whole function and procedure bodies (e.g. ECMAScript), orsome larger unit of code (e.g. ?). The former is known asstatic nested scope.