che-che4z-lsp-for-hlasm
che-che4z-lsp-for-hlasm copied to clipboard
Variable values of system variables in macros
Describe the bug
There are some system variables whose value can change within a macro (&SYSSTMT, &SYSM_HSEV, &SYSM_SEV)
To Reproduce
MACRO
MAC &ARG
&I SETA 0
.LOOP AIF (&I GE 2).END
L&ARG LHI 0,0
&I SETA &I+1
AGO .LOOP
.END ANOP
MEND
MAC &SYSSTMT
END
Expected behavior
Loc Object Code Addr1 Addr2 Stmt Source Statement HLASM R6.0 2022/03/14 12.56
1 MACRO 00030901
2 MAC &ARG 00031001
3 &I SETA 0 00031101
4 .LOOP AIF (&I GE 2).END 00031201
5 L&ARG LHI 0,0 00032001
6 &I SETA &I+1 00032101
7 AGO .LOOP 00032201
8 .END ANOP 00032301
9 MEND 00032401
10 MAC &SYSSTMT 00032501
000000 A708 0000 11+L00000011 LHI 0,0 01-00005
000004 A708 0000 12+L00000012 LHI 0,0 01-00005
13 END 00032801
Platform
- Editor: VS Code 1.65.2
- OS: Windows
- Plugin version: 1.0.0
See also section "Scope and variability of system variable symbols" of V1R6 Language Reference for a little bit more details