Top "Global-variables" questions

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

What is the difference between "option" and "set CACHE BOOL" for a CMake variable?

Is there any difference between the following two? set(FOO true CACHE BOOL "description") option(FOO "description" ON) Documentation: set …

cmake boolean global-variables cmake-gui
How to create global variables in Erlang

I am writing an ejabberd module to filter packets. I need to get the hostname to pull some configs using …

erlang global-variables hook ejabberd
Passing a variable between frames with actionscript 3

I am new to actionscript 3.0 and I'm experiencing difficulty trying to pass a variable that is created and set in …

actionscript-3 global-variables flash-cs3
Global variables in packages in R

I'm developing a package in R. I have a bunch of functions, some of them need some global variables. How …

r global-variables
how refer to a local variable share same name of a global variable in C?

for example #include<stdio.h> int foo = 100; int bar() { int foo; /* local foo = global foo, how to implemented? */ …

c global-variables scope local-variables
Several disqus-threads on one page

we have a website where we have list a lot of events, and would like to add discussions to each …

javascript global-variables disqus
Effect of declared and undeclared variables

What is the major difference between JavaScript declared and undeclared variables, since the delete operator doesn't work on declared variables? …

javascript variables global-variables variable-declaration
How to get variables shared between child and parent process while using fork in perl

I am using fork in my code. Before fork call in my code, the parent process has a global variable …

perl global-variables ipc fork shared
C++ global variable not initialized when linked through static libraries, but OK when compiled with source

I have created a system that automatically registers function objects (functors) into a map based on the constructor of an …

c++ initialization global-variables static-libraries static-linking
C - program structure (avoiding global variables, includes, etc.)

I'm using C (not C++) and I'm unsure how to avoid using global variables. I have a pretty decent grasp …

c global-variables program-structure