Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

lexical scope

You are here: irt.org | FOLDOC | lexical scope

<programming> (Or "static scope") When the scope of an identifier is fixed at compile time to some region in the source code containing the identifier's declaration. This means that an identifier is only accessible within that region (including procedures declared within it).

This contrasts with dynamic scope where the scope depends on the nesting of procedure and function calls at run time.

Statically scoped languages differ as to whether the scope is limited to the smallest block (including begin/end blocks) containing the identifier's declaration (e.g. C, Perl) or to whole function and procedure bodies (e.g. ECMAScript), or some larger unit of code (e.g. ?). The former is known as static nested scope.

(2005-07-28)

Nearby terms: lexer « lexical analyser « lexical analysis « lexical scope » lexical scoping » lexiphage » LF

FOLDOC, Topics, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, ?, ALL

©2018 Martin Webb