Correct me if I'm wrong, but can't jumping out of a stack-based loop without adjusting the stack (popping the last address) come back to bite you in the a** later?
Luckily it's not for us to worry about. If it's allowed in the language it's the problem of the compliler writer. (Mark)
Some languages that have an Exit command, such as PowerBasic, support a syntax of:
Exit [number of levels] ' Default is 1
Exit [number of levels] ' Default is 1
You must be thinking of some other language. The PowerBasic syntax for exiting multiple loops is:
DO DO EXIT, EXIT ' exit both loops LOOP LOOPAs you can see from the declare, PowerBasic does have a lot of cool features to deal with this issue: (from PowerBasic Help)
Purpose: Transfer program execution out of a block structure.
Syntax: EXIT [FOR | FUNCTION | IF | DO | LOOP | MACRO | SELECT | SUB | TRY]
EXIT [, EXIT] [, ...] [, ITERATE]
Remarks: The EXIT statement lets you leave a structure prematurely. Using EXIT by itself will leave the most recently executed structure. For example...