SA0078: Missing CASE branches
Function | Determines CASE statements without cases, i.e. with only a single ELSE statement. |
Reason | A CASE statement without cases wastes execution time and is difficult to read. |
Importance | Medium |
Sample:
PROGRAM MAIN
VAR
nVar : DINT;
bVar : BOOL;
END_VARnVar := nVar + INT#1;
CASE nVar OF // => SA0078
ELSE
bVar := NOT bVar;
END_CASE