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

Blitz3DBlitzPlusBlitzBasic

Const

Const name[type] = value[, name2[type] = value2 ...]

Description

Gives a name to a value that cannot change. The value has to be given at once, and a name that is a constant cannot be assigned to. Constants can only be declared in the main program, but every function can use them. Names are not case sensitive, so Const Limit = 3 and a variable called limit are the same name.

Examples

Const WIDTH = 4, HEIGHT = 3
Const TITLE$ = "grid"
Print TITLE$ + " " + (WIDTH * HEIGHT)
grid 12

Related Commands

End, Global

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally