NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables 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