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). The scope of a name binding is also known as the visibility of an entity, particularly in older or more technical literature—this is from the perspective of the referenced entity, not the referencing name.

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.