Hello Community,
When I run the following code with x undefined in terminal, it throws a syntax error and returns control to the program stack. After issuing a GO command, execution continues, and setting the global variable ^zz1.
code 1:
test.mac
if$Data(@x@(a,b,c)) {
set^zz1=1212
}
write !,1212,!
////orif$Data(@x@(a,b,c)) set^zz1=1212write !,1212,! if I assign the result of $D(@x@(a,b,c)) to a local variable like d using set d=$D(@x@(a,b,c)), and then use if d { ... }, the code fails(global is not set) working as expected.
Code 2
.png)
.png)