SA0062: Uses of TRUE or FALSE in expressionsPermalink

Detects the use of the literals ‎TRUE‎ or ‎FALSE‎ in expressions

Justification: This kind of expression is obviously unnecessary and may indicate an error. In any case, the expression unnecessarily affects the runtime.

Importance: Medium

Example

PROGRAM PLC_PRG
VAR
	xTemp1, xTemp2 : BOOL;
END_VAR
xTemp1 := xTemp1 AND NOT TRUE;
xTemp2 := xTemp1 OR TRUE;
xTemp2 := xTemp1 OR NOT FALSE;
xTemp2 := xTemp1 AND FALSE;

--> Uses of TRUE or FALSE in expressions