Top "Global-variables" questions

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

PHP pass variable to include

I'm trying to pass a variable into an include file. My host changed PHP version and now whatever solution I …

php variables include global-variables global
How do you use global variables or constant values in Ruby?

I have a program that looks like: $offset = Point.new(100, 200); def draw(point) pointNew = $offset + point; drawAbsolute(point) end draw(…

ruby global-variables
Global variables in c#.net

How can I set a global variable in a C# web application? What I want to do is to set …

c# .net global-variables
Are global variables bad?

In C/C++, are global variables as bad as my professor thinks they are?

c++ c global-variables
Compiler error: "initializer element is not a compile-time constant"

When compiling this code, I get the error "initializer element is not a compile-time constant". Can anyone explain why? #import "…

objective-c cocoa initialization compiler-errors global-variables
Variable not accessible when initialized outside function

When I use code like this, it works fine: function removeWarning() { var systemStatus = document.getElementById("system-status"); systemStatus.innerHTML = ""; } function indicateInvalidUsername() { …

javascript global-variables
Global variable Python classes

What is the proper way to define a global variable that has class scope in python? Coming from a C/…

python global-variables
What is the best way to declare global variable in Vue.js?

I need access to my hostname variable in every component. Is it a good idea to put it inside data? …

global-variables vue.js
How to declare Global Variables in Excel VBA to be visible across the Workbook

I have a question about global scope and have abstracted the problem into a simple example: In an Excel Workbook: …

excel module global-variables public vba
static and extern global variables in C and C++

I made 2 projects, the first one in C and the second one in C++, both work with same behavior. C …

c++ c static global-variables extern