SA0163:嵌套注释
检测嵌套评论
理由:应避免嵌套注释,因为它们难以阅读。
重要性:低
PLCopen 规则:C3
例 121. 例子
{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 *)
输出在 留言 看法:
SA0163:嵌套评论“嵌套评论 1”
SA0163:嵌套评论“嵌套评论 2”
SA0163:嵌套评论“嵌套评论 3”
SA0163:嵌套评论“嵌套评论 4”
SA0163:嵌套评论“嵌套评论 5”