- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
If I a shared boolean variable as the condition of a while loop and only in another function/trigger can its value get changed, will that while loop receive the update and terminate? Or does it loop forever?
Question is, will foo() then terminate, or will it loop forever, even after calling bar()?
If I a shared boolean variable as the condition of a while loop and only in another function/trigger can its value get changed, will that while loop receive the update and terminate? Or does it loop forever?
JASS:
set A.bool = true
function foo takes nothing returns nothing
loop
exitwhen A.bool == false
...
endloop
endfunction
function bar takes nothing returns nothing
set A.bool = true
endfunction
...
call foo()
call bar()
Question is, will foo() then terminate, or will it loop forever, even after calling bar()?