global variable
compound.compound. a piece of information in a computer program that any part of the code can see and change. You use it when you want data to be available everywhere in your project.
compound. a variable declared outside of any specific function or block, making it accessible throughout the entire program's scope. Often discouraged in modern software engineering due to the risk of unintended side effects across different modules.
The programmer used a global variable to store the user's name.
While using a global variable is convenient for small scripts, it can make debugging large applications very difficult.
The architectural review highlighted that over-reliance on a global variable for state management had introduced several race conditions that were nearly impossible to replicate in a testing environment.
A compound of the adjective global, derived from the Latin globus, and the noun variable, from the Latin variabilis. The term emerged as a logical extension of scope terminology in early procedural programming languages to distinguish these entities from local counterparts.
Commonly used in the plural; often contrasted with 'local variable'.