Scope

From Computer History Wiki
Revision as of 14:25, 14 September 2018 by Jnc (talk | contribs) (An OK start)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Scope is the range in a program over which a particular variable is visible/usable.

For instance, local variables in an inner block can only be used in that block.

A global variable is one which can be seen, and used, anywhere; in programming languages which allow separately compiled modules to be joined together with a linker after the compilation, a global variable created in one could be seen/used in any part of the linked program.