检测没有CASE
分支的CASE
语句和只有一个ELSE
语句
理由没有案例的CASE
语句不仅浪费执行时间,而且难以读取。
重要性:中型
示例
PROGRAM PLC_PRG VAR iVar : INT; xTemp : BOOL; END_VAR iVar := iVar + INT#1; //in the following the case descriptions are missing: CASE iVar OF ELSE xTemp := NOT xTemp; END_CASE --> SA0078: CASE-Missing CASE branches