Const

( Basic4GL 2.4.3 )

Const - create a constant

Syntax

Description

Examples

Direction Constants

Sometimes declaring the four cardinal directions can save you time and make your code more readable :

Const up = 1
Const down = 4
Const left = 3
Const right = 4

This way you can write code like this :

Dim dir
dir = down ' start direction
' later in code..
If dir = up Then something.y = something.y - 8 EndIf

Related Pages

This page has been recommended for cleanup, integration, etc.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 2.5 License.