Top "Global-variables" questions

Global variables are variables that are accessible from all elements of a software component.

C++ Global variable declaration

What I want to do is just to define a variable in a header file and use it on two …

c++ variables global-variables
Python: logging module - globally

I was wondering how to implement a global logger that could be used everywhere with your own settings: I currently …

python logging module global-variables
Declaring a global variable in MATLAB

Is there a way to declare global variables in MATLAB? Please don't respond with: global x y z; Because I …

matlab global-variables
Declaring variables without var keyword

At w3schools there is written: If you declare a variable, without using "var", the variable always becomes GLOBAL. Is …

javascript variables global-variables declaration
How do I declare an array when I don't know the length until run time?

I originally had an array[1..1000] that was defined as a global variable. But now I need that to be n, …

delphi arrays global-variables dynamic-arrays redefine
List all PHP variables

Is it possible to dump all global variables in a PHP script? Say this is my code: <?php $foo = 1; $…

php variables global-variables
Global variables for node.js standard modules?

I know that global variables are bad. But if I am using node's module "util" in 40 files in my framework, …

javascript module node.js global-variables shared-libraries
I've Heard Global Variables Are Bad, What Alternative Solution Should I Use?

I've read all over the place that global variables are bad and alternatives should be used. In Javascript specifically, what …

javascript global-variables
Is it possible to define global variables in a function in Python

How do I declare a global variable in a function in Python? That is, so that it doesn't have to …

python function global-variables
Global dictionaries don't need keyword global to modify them?

I wonder why I can change global dictionary without global keyword? Why it's mandatory for other types? Is there any …

python dictionary scope global-variables global