program-wide variable
nounUK /ˈprəʊ.ɡræm.waɪd ˈveə.ri.ə.bəl/
US /ˈproʊ.ɡræm.waɪd ˈver.i.ə.bəl/
A box that holds a value and can be seen and used by every part of a computer program.
The game score is stored in a program-wide variable so every screen can show it.
RELATED WORDS
OTHER MEANINGS
2. A variable declared outside all functions so all code in the program can read or change it.
She made the player's name a program-wide variable so every level could display it.
3. A setting that keeps one value for the entire run of a program.
The language choice is a program-wide variable that stays the same until the app closes.
4. A shared storage spot that lets different parts of a program pass information to each other.
They used a program-wide variable to share the login status between the menu and the game.