NL009: Upper bound of FOR should not be *OCC
NL009: Upper bound of FOR should not be *OCC
type: code-smell
priority: major
#performance
Description
The upper bound for FOR-loops should not be *OCC
, as the length of the array will be recalculated on every iteration.
Invalid
FOR #I = 1 TO *OCC(#ARR)
Valid
#S-ARR := *OCC(#ARR)
FOR #I = 1 TO #S-ARR