Skip to content
Narta Xaymar Dirks edited this page Oct 27, 2026 · 1 revision

Blitz3DBlitzPlusBlitzBasic

Global

Global name[type] [= value][, name2[type] ...]

Description

Declares a variable that the main program and every function see. Variables made without a declaration inside a function are local to it. A global can only be declared in the main program, and it is 0 or an empty text until you assign it.

Examples

Global total = 0

Function Add(n)
	total = total + n
End Function

Add(2)
Add(3)
Print total
5

Related Commands

Const, End, Include, Local

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally