Keyword Global

Declares a global variable.


Global Identifier:Type [ = Expression ]

Global Identifier:= Expression


The Global keyword declares a permanent variable of a given type; this variable is accessible throughout the entire module scope. Global variables may be declared at module scope, or within a class declaration.

The alternative syntax provided allows the variable's type to be deduced from the expression.

See also

Const | Local | Field
Language reference


Global Gravity:Float = 0.9 
Global GameName:String = "Gravity Dog" 
Global Player:MyObject = New MyObject