Menu

#124 Using "Exit <code> scope=procedure" breaks procedure

2.0.4
open
nobody
5
2013-02-18
2011-02-25
Anonymous
No

If you exit from a procedure using "Exit <code> scope=procedure", every following invocation will be skipped, it will just return immediately without executing any of the code within it.

For example, if you turn on stepping and run this, you will see that it skips evaluating the procedure when "MyExit 0" is reached:

procedure MyExit {
Exit {1} scope="procedure"
}

MyExit 1
MyExit 0
if ({_EXIT_CODE} == 0 ) {
Wait 10
}

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.