CONST
 
Syntax

CONST symbolname = value

Description


Declares compiler-time constant symbols that can be an integer. Value may also be an expression using other constants (not variables).

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 were limited to 16bit values for versions prior to 6.19 and only positive numbers. This restriction has been removed in the ARMmite and in the ARMexpress which use the PC Compiler .  But it will remain limited to 16 bit positive or negative values when using the onboard 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