upd[] in an if condition is evaluated in non-executed branch #23428
Answered
by
gemu2015
aviaxsim
asked this question in
scripter / SML
-
Hello, Using the script: >D
a=0
>S
a=1
if 0==1 {
if upd[a]>0 { ; upd1
}
}
if upd[a]>0 { ; upd2
print logged - ok
} else {
print logged - wrong
} upd1 is evaluated, even it's in the non-executed branch, resulting in failed upd2 test. Console output:
print logged - wrong Probably this applies to all the condition expressions in nested ifs. I don't know if it's a known behavior. If yes, it could be documented in the manual. edit: corrected example |
Beta Was this translation helpful? Give feedback.
Answered by
gemu2015
May 26, 2025
Replies: 1 comment 4 replies
-
Can't see what you mean about "upd1 is evaluated ... resulting in"
Still, the only console output is |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fixed in latest dev