SPC  Version 0.9.5
 All Files Functions Groups Pages

The const keyword is used to alter a variable declaration so that the variable cannot have its value changed after it is initialized.

The initialization must occur at the point of the variable declaration.

const int myConst = 23; // declare and initialize constant integer
task main() {
int x = myConst; // this works fine
myConst++; // compiler error - you cannot modify a constant's value