Top "Global" questions

Refers to a space where variables and other items may be accessed from any scope.

In Python what is a global statement?

What is a global statement? And how is it used? I have read Python's official definition; however, it doesn't make …

python global
Are global variables in PHP considered bad practice? If so, why?

function foo () { global $var; // rest of code } In my small PHP projects I usually go the procedural way. I generally …

php global-variables global
What is the 'global' object in NodeJS

I've just seen a weird behaviour of the this keyword in NodeJS environment. I'm listing them with code. I've run …

javascript node.js scope this global
Python global variable

def say_boo_twice(): global boo boo = 'Boo!' print boo, boo boo = 'boo boo' say_boo_twice() The output …

python variables global-variables global
Why are global variables considered bad practice?

I keep seeing warnings not to use global variables in JavaScript, but it seems that the only reason people say …

javascript global-variables global
Highcharts.js will not render the chart, it says error "Cannot read property 'series' of undefined"

I think it is because my global var chart hasn't been set yet when my function requestData is called. This …

javascript highcharts undefined global series
Can you extern a #define variable in another file?

For example abc.c contains a variable #define NAME "supreeth" Can extern the variable NAME in def.c?

c global extern
Perl - Global variables available in all included scripts and modules?

So lets say I have a main.pl script and in that script I need to declare some variables (any …

perl variables module global
Mute the global sound in Android

Is there a method that can be used to mute the global sound from an application button?

android audio global mute
Access a global static variable from another file in C

In C language, I want to access a global static variable outside the scope of the file. Let me know …

c global static-variables