Skip to content
Chris A edited this page Aug 9, 2026 · 1 revision

Enum

Enum name
	member1
	member2 = value
	member3
End Enum

Declares a set of Global Int constants. The first member is 0 unless given an explicit value. Every member after that counts up by 1 from the previous one, unless it's given its own explicit value, in which case counting continues from there.

Enum can only appear in the main program, not inside a Function. An explicit value must be a constant integer expression.

Enum Direction
	North
	East
	South
	West
End Enum

debuglog North   ; 0
debuglog East    ; 1
debuglog South   ; 2
debuglog West    ; 3
Enum Flags
	FlagA = 1
	FlagB
	FlagC = 10
	FlagD
End Enum

debuglog FlagA   ; 1
debuglog FlagB   ; 2
debuglog FlagC   ; 10
debuglog FlagD   ; 11

Clone this wiki locally