NL018: Typed variables should be qualified
NL018: Typed variables should be qualified
type: code-smell
priority: minor
#bad-practice
Description
Typed variables should always be qualified with their (top) group name to improve readability.
Consider this DEFINE DATA
structure:
DEFINE DATA
LOCAL
1 #WORK
2 #MYVAR (N1)
END-DEFINE
Now, this is the correct way to write a MOVE
statement:
MOVE 1 TO #WORK.#MYVAR
(as opposed to MOVE 1 TO #MYVAR
)
This behavior can be configured using the natls.style.disallowtoplevelvars
option in the analyzer configuration