Variables may have an initial value.
For EEPROM variables, the initial value is loaded once by the programmer at processor programming time. This initial value is never written by the program.
NEW! (V2.0): For RAM variables, the initial value is loaded once upon each program startup, before entering the main program loop.
Local variables (in procedures and functions) may have an initial value, they are initialized once upon program startup like others, not upon procedure / function entry. They behave like modifiable initialized "CONST" in TP / Delphi. |
VAR
{$SPACE EEPROM} // next in EEPROM
EE_BYTE_3: BYTE = 123; { EE simple variable with an initial value }
EEArray: ARRAY[1 .. 2] OF BYTE = (100, 200); { EE arrays may have initial values }
{$SPACE RAM} // next in RAM
RAMArray: ARRAY[1 .. 2] OF BYTE = (100, 200); { New in V2: RAM variables may have initial values }