Scope

The scope of a name is the region of source code in which the name can be used.

Related concepts:  NameLifetime

Closest Wikipedia entry:  Scope (computer science) — In computer programming, the scope of a name binding (an association of a name to an entity, such as a variable) is the part of a program where the name binding is valid; that is, where the name can be used to refer to the entity. In other parts of the program, the name may refer to a different entity (it may have a different binding), or to nothing at all (it may be unbound). Scope helps prevent name collisions by allowing the same name to refer to different objects – as long as the names have separate scopes.

Authoritative Definition

Wikipedia does not necessarily offer the best fitting definition of a concept. The exact meaning we attribute to the concept of Scope is based on principled authoritative sources such as:

Misconceptions about Scope
8 documented Misconceptions

Check Yourself

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.