SA0078: Rami CASE mancantiPermalink

Rileva gli enunciati ‎CASE‎ senza rami ‎CASE‎ e solo un enunciato ‎ELSE‎

Giustificazione: Un'istruzione ‎CASE‎ senza casi spreca tempo di esecuzione ed è difficile da leggere.

Importanza: Medio

Esempio

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