#Dim declaring an initial value
objectscriptQuality release
Id
OS0046
Rule type
Code Smell
Severity
Minor
Minor
SQALE characteristic
- Reliability
- Instruction
Remediation function
Constant/issue
Remediation cost
5min
The #Dim preprocessor directive allows to write, for instance:
#dim x as %Integer = 2
However, this has a hidden consequence of generating an additional statement in the code, even though this is a preprocessor directive. The above is in fact equivalent to:
#dim x as %Integer set x = 2