SecondBASIC Documentation v3

Home / Command Reference / Const

Const

Description: Defines a constant variable. Constants must be defined before they are used, and can only be whole numbers. All constants begin with #. This means #a is different than a&. Constants are substituted to their numerical values before compiling.

Syntax:

Const #<variable> = <value>

Part Description
<variable> Required. This is the variable name.
<value> Required. This is the value of the variable.

Example:

        Const #a = 32
        a = #a + 10
        Print #a, a