-
why can not i use this rule to validate variable declaration |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hey @zrwsmd, I assume you're using the default lexical scoping mechanism. Since the variables inside of the InputsListSingle object are nested in its local scope, they are not visible to the elements of the surrounding Note that using the word validate here is incredibly confusing. The issue isn't that you cannot validate, but that the reference cannot correctly link. The validation error is only a consequence of the linker error. |
Beta Was this translation helpful? Give feedback.
Hey @zrwsmd,
I assume you're using the default lexical scoping mechanism. Since the variables inside of the InputsListSingle object are nested in its local scope, they are not visible to the elements of the surrounding
PLC_PRG
program. You need to adjust theScopeComputation
(see here for an example) to ensure that elements are visible outside of their parent node.Note that using the word validate here is incredibly confusing. The issue isn't that you cannot validate, but that the reference cannot correctly link. The validation error is only a consequence of the linker error.