CONST
 
Syntax

CONST symbolname = value

Description


Declares compiler-time constant symbols that can be an integer.

More complex CONST can now be handled by #define -- see pre-processor

under the hood-

Constants do not take up any program space on the ARMmite or when using the PC Compile option on the ARMexpress.  In this case the constants are used by the compiler running on the PC and compiled into code when used.  When using the ARMexpress compiler, constants do take up space in the symbol table.

Constants can be 32 bit values using the PC ARMbasic compiler, butconstants are limited to 16bit values for the onchip ARMweb compiler.

Example

CONST reps = 5
 
FOR I = 1 TO reps
  PRINT I
NEXT I
 
   --  will print out
1
2
3
4
5


Differences from other BASICs

See also