Jump to content

Flow-control structures: Difference between revisions

m
Line 1,402:
 
====Using Break/Continue in Select Case====
Normally the Break statement break module (exit from module) or a Try { } block. Normally Continue is like exit in ordinary blocks or a new iteration for loop structures. For a Select case, a Break make the execution of other blocks from other cases to executed until "case else" or a continue statement. Both ends goes to end select. So break works in reverse of c's break. Without block { } in cases, Break and Continue works for the outer block (like normal break and continue). We can use Goto in cases, to exit select/end select structure, using or not using block in cases. Gosub can be used as usual everywhere.
 
<syntaxhighlight lang="m2000 interpreter">
404

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.