Skip to main content

SA0100: Variables greater than <n> bytes

Detects variables that use more than n bytes, where n is defined by the current configuration. Default value: 1024 bytes. The value can be changed by double-clicking the line.

Justification: Some programming guidelines specify a maximum size for a single variable. This can be checked with this.

Importance: Low

Example 89. Example
PROGRAM PLC_PRG
VAR
    aobyTest : ARRAY [0..1024] OF BYTE;
END_VAR
aobyTest[INT#0] := aobyTest[INT#0] + BYTE#1;

Output in the Messages view:

  • sa_icon_message.png SA0100: Variable 'aobyTest' greater than 1024 bytes