Top "Global-variables" questions

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

C++ singleton vs. global static object

A friend of mine today asked me why should he prefer use of singleton over global static object? The way …

c++ static singleton global-variables
Public Static variable in excel vba

Is it possible to have a static variable declared in one procedure, and use this variable in several different procedures …

excel vba global-variables public shared
How do I call setattr() on the current module?

What do I pass as the first parameter "object" to the function setattr(object, name, value), to set variables on …

python module global-variables getattr setattr
Why can't I set a global variable in Python?

How do global variables work in Python? I know global variables are evil, I'm just experimenting. This does not work …

python global-variables
How to make object created within function usable outside

I created a function which produces a matrix as a result, but I can't figure out how to make the …

r function environment-variables global-variables assign
How can I define an AngularJS service using a TypeScript class that doesn't pollute the global scope?

I am using AngularJS and TypeScript. I want to implement an AngularJS service using a Typescript class, like this: class …

angularjs global-variables typescript angularjs-service
Modifying global variables in Python unittest framework

I am working on a series of unit tests in Python, some of which depend on the value of a …

python unit-testing global-variables
Global Variable in Userform

I search about this in the forum and found some answers but did not work for me. I have two …

vba global-variables userform
Do DOM tree elements with ids become global variables?

Working on an idea for a simple HTMLElement wrapper I stumbled upon the following for Internet Explorer and Chrome: For …

javascript dom global-variables getelementbyid identifier