SA0164:多行注释
检测编码为的多行注释 (* comment *)
.仅编码为的单行注释 // comment
被允许。
理由:一些编程指南禁止代码中的多行注释,因为注释的开头和结尾可能会丢失,并且结束注释括号可能会被意外删除。
提示
您可以通过编译指示停用此检查 analysis
,也用于声明部分的注释。
重要性:低
PLCopen规则:C5
例 122. 例子
{attribute 'do-analysis'} (* This is a multi-line comment // SA0164 *) PROGRAM PLC_PRG VAR // This is a single line comment a: DINT; END_VAR
(* This is not a single line comment *) // SA0164 a := a + 1;
输出在 留言 看法:
SA0164:仅使用单行注释