Top "Global-variables" questions

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

Prevent loss of variables when browser reload button is pressed

Is it possible to keep my (global) variables when the page is reloaded? If yes, how? Thanks for any help. …

javascript global-variables reload
Finding the address range of the data segment

As a programming exercise, I am writing a mark-and-sweep garbage collector in C. I wish to scan the data segment (…

c memory-management garbage-collection global-variables memory-layout
Is it possible to define global variables in postgresql

I am using postgresql 9.4 and while writing functions I want to use self-defined error_codes (int). However I may want …

postgresql global-variables postgresql-9.4
How to unset global variable in php?

I know very basic of php and web programming. Here is my php code. I have seen couple of similar …

php global-variables unset
Malloc function (dynamic memory allocation) resulting in an error when it is used globally

#include<stdio.h> #include<string.h> char *y; y=(char *)malloc(40); // gives an error here int …

c malloc global-variables dynamic-memory-allocation
Python global keyword vs. Pylint W0603

Pylint W0603 states: Using the global statement. Used when you use the "global" statement to update a global variable. PyLint …

python global-variables global pylint
Objective C - How to use extern variables?

I am trying to use extern variables. It complains that because of using numberWithInt I am not passing a contants …

objective-c global-variables extern
Use of static variables and functions in global scope

Is there a use for flagging a variable as static, when it lies in the global scope of a .cpp …

c++ static global-variables global static-variables
Why are global variables bad, in a single threaded, non-os, embedded application

Most of the objections I see to using global variables make sense since they refer to issues of multiple threads, …

c embedded global-variables
ok , global variable is condemned, singleton is despised, what's the alternative?

For desktop application that is. This is just a general question that maybe only need general answers.

singleton global-variables