SA0101: Names with invalid length
Function | Determines names with invalid length. The object names must have a defined length. You can configure the parameters that are taken into account in the check by double-clicking on the row for rule 101 in the rule configuration (PLC Project Properties > category "Static Analysis" > "Rules" tab > Rule 101). You can make the following settings in the dialog that appears:
|
Reason | Some programming guidelines specify a minimum length for variable names. Compliance can be verified with this analysis. |
Importance | Low |
PLCopen rule | N6 |
Samples:
Rule 101 is configured with the following parameters:
- Minimum number of characters: 5
- Maximum number of characters: 30
- Exceptions: MAIN, i
Program PRG1:
PROGRAM PRG1 // => SA0101
VAR
END_VARMAIN program:
PROGRAM MAIN // no error due to configured exceptions
VAR
i : INT; // no error due to configured exceptions
b : BOOL; // => SA0101
nVar1 : INT;
END_VARPRG1();