Skip to main content

SA0163: commenti nidificati

Rileva i commenti nidificati

Motivazione: I commenti annidati dovrebbero essere evitati perché di difficile lettura.

Importanza: Bassa

Regola PLCopen: C3

Esempio 121. Esempio
{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 *)

Uscita in Messaggi vista:

  • sa_icon_message.png SA0163: Commento nidificato 'nested comment 1'

  • sa_icon_message.png SA0163: Commento nidificato 'nested comment 2'

  • sa_icon_message.png SA0163: Commento nidificato 'nested comment 3'

  • sa_icon_message.png SA0163: Commento nidificato 'nested comment 4'

  • sa_icon_message.png SA0163: Commento nidificato 'nested comment 5'