Top "Global-variables" questions

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

Can I use __init__.py to define global variables?

I want to define a constant that should be available in all of the submodules of a package. I've thought …

python global-variables module packages init
How to return an array in bash without using globals?

I have a function that creates an array and I want to return the array to the caller: create_array() { …

arrays bash global-variables parameter-passing
Global constants in Groovy

It is often desired to declare constants at the top of a script that can be referenced anywhere else in …

groovy global-variables
C/C++ global vs static global

Possible Duplicate: Static vs global I'm confused about the differences between global and static global variables. If static means that …

c++ c static global-variables
Global Variables in Dart

I try to create a Dart single page application. I have created a first custom element (custom-application) which contains the …

dart global-variables
Function not changing global variable

my code is as follow: done = False def function(): for loop: code if not comply: done = True #let's say that …

python global-variables
Why does assigning to my global variables not work in Python?

I'm having terrible trouble trying to understand python scoping rules. With the following script: a = 7 def printA(): print "Value of …

python global-variables scope
Correct Use Of Global Variables In Python 3

Which is the correct use of global variables in Python 3?: 1) Stating global VAR_NAME once in the core script (not …

python function variables python-3.x global-variables
Why are global variables evil?

I'm trying to find out why the use of global is considered to be bad practice in python (and in …

python global-variables side-effects
How to avoid global variables in JavaScript?

We all know that global variables are anything but best practice. But there are several instances when it is difficult …

javascript global-variables