Node:Global variables, Next:, Previous:Scope, Up:Scope

Global Variables

Global variables can be used in any function, as well as any block within that function. (Technically, global variables can only be seen by functions that are defined after the declaration of those global variables, but global variables are usually declared in a header file that is included everywhere they are needed.) Global variables are created when a program is started and are not destroyed until a program is stopped.