The Scope reference article from the English Wikipedia on 24-Jul-2004
(provided by Fixed Reference: snapshots of Wikipedia from wikipedia.org)

Scope

Sponsor with the world's largest charity for orphans
The scope of a given activity or subject is the area or range of what it covers. SCOPE is the acronym for the Scientific committee on problems of the environment.

Table of contents
1 Computer Programming
2 Project management
3 Telescopic gun sight
4 See also

Computer Programming

In computer programming, the scope of an identifier refers to where and when in the program the identifier can be referenced. Scope applies to all identifiers in a program, but it is mostly used for variables, functionss and classeses.

For example, the scope of a variable refers to where in the program the variable can be accessed and/or modified. For a function, to where the function can be called, and so on.

Common scope levels:

Scope is usually hierarchical: a variable declared at local scope (for example, as a local variable inside a function) supersedes the same variable declared at global scope. All references to this variable inside the function will manipulate the locally-defined variable. Outside the function, they will manipulate the globally-defined variable.

Because of this automatic scope handling, careful management of variable, class and function names should be a requirement for any non-trivial program. It is considered good programming practice to make variables as narrow a scope as feasible so that different parts of your program do not accidentally interact with each other by modifying each other's variables. This also prevents Action at a distance. Common techniques for doing so are to have different sections of your program use different namespaces, or else make individual variables private through either dynamic variable scoping or lexical variable scoping.

Project management

In project management, scope refers to the sum total of all project products and their features. See also scope creep.

Telescopic gun sight

The scope of a firearm is a telescopic sight. See also Sniper Rifles.

See also

-scope