CONST

Concept Link IconSee also

Declaration of a constant.

WebVue support - Yes.

Constants must always be declared in the header block of the program (outside of the functions).

Syntax

CONST ConstName = Value;

Argument

Meaning

ConstName

The name of the constant.

Value

The value that the constant represents.

Execution

Constants may only be numeric. Unnamed numeric values are also known as constants.

Example

'Declare constants

Const constant1 = 10;

Const constant2 = 10;

 

SUB Main()

DIM intparameter as integer;

DIM intresult as integer;

 

intparameter= 15;

intresult = (intparameter + constant1)/ constant2;

PRINT("Result is: ",intresult);

'Display: Result is: 2

END SUB