SA0163: Nested comments
Function | Determines code positions with nested comments. |
Reason | Nested comments are difficult to read and should be avoided. |
Importance | Low |
PLCopen rule | C3 |
Samples:
The four nested comments identified accordingly in the following sample each result in the error: "SA0163: Nested comment '<…>'".
(* That is
(* nested comment number 1 *)
*)
PROGRAM MAIN
VAR
(* That is
// nested comment
number 2 *)
a : DINT;
b : DINT;
(* That is
(* nested comment number 3 *) *)
c : BOOL;
nCounter : INT;
END_VAR(* That is // nested comment number 4 *)
nCounter := nCounter + 1;
(* This is not a nested comment *)