SA0078: Missing CASE branches
Detects CASE statements without CASE branches and only one ELSE statement
Justification: A CASE statement without cases wastes execution time and it is difficult to read.
Importance: Medium
Example 85. Example
PROGRAM PLC_PRG
VAR
iVar : INT;
xTemp : BOOL;
END_VARiVar := iVar + INT#1;
//in the following the case descriptions are missing:
CASE iVar OF
ELSE
xTemp := NOT xTemp;
END_CASE
Output in the Messages view:
SA0078: Missing CASE branches