SA0100: Variables greater than <n> bytes

Function

Determines variables that use more than n bytes; n is defined by the current configuration.

You can configure the parameter that is taken into account in the check by double-clicking on the row for rule 100 in the rule configuration (PLC Project Properties > category "Static Analysis" > "Rules" tab > Rule 100). You can make the following settings in the dialog that appears:

  • Upper limit in bytes (default value: 1024)

Reason

Some programming guidelines specify a maximum size for a single variable. This function facilitates a corresponding check.

Importance

Low

Sample:

In the following sample the variable aSample is greater than 1024 bytes.

PROGRAM MAIN
VAR
    aSample : ARRAY [0..1024] OF BYTE;              // => SA0100
END_VAR