SA0163: Verschachtelte Kommentare
Ermittelt verschachtelte Kommentare.
Begründung: Verschachtelte Kommentare sind schwer zu lesen und sollten deswegen vermieden werden.
Wichtigkeit: Niedrig
PLCopen-Regel: C3
Beispiel 121. Beispiel
{attribute 'do-analysis'}
(* That is
(* nested comment 1 *)
*)
PROGRAM PLC_PRG
VAR
(* That is
// nested comment 2
comment *)
iVal1: INT;
iVal2: INT;
(* That is
(* nested comment 3 *) *)
pVal3: POINTER TO DWORD;
hugo: INT;
END_VAR
(* That is // nested comment 4 comment *) iVal1 := iVal1 + 1; (* That is (* nested comment 5 *) *) (* Not that one *)
Ausgabe unter Ansicht Meldungen:
SA0163: Verschachtelter Kommentar 'nested comment 1'
SA0163: Verschachtelter Kommentar 'nested comment 2'
SA0163: Verschachtelter Kommentar 'nested comment 3'
SA0163: Verschachtelter Kommentar 'nested comment 4'
SA0163: Verschachtelter Kommentar 'nested comment 5'