Usage of legacy block style
objectscriptQuality release
Id
OS0092
Rule type
Code Smell
Severity
Major
Major
SQALE characteristic
- Maintainability
- Readability
Remediation function
Constant/issue
Remediation cost
1h
The usage of legacy style blocks is discouraged. This style is a legacy from language previous to objectscript, wether it is accepted by compatibility with old syntaxis.
Non-compliant code
Following code will is readable only for very experienced developers on previous languages to objectscript.
new a,i for i=1:1 do quit:i>10 . Write !,"i:",i," " . for j=1:1:3 do .. write i_j_" " . set a=$get(a)_i_"," write !,"a=",a quit 123
Compliant code
Following code is more readable for any developer and compliant with objectscript.
for i=1:1:10 { Write !,"i:",i," " for j=1:1:3 { write i_j_" " set a=$get(a)_i_"," } } write !,"a=",a quit 123