Difference between revisions of "Goto"
From Wiki
m |
m |
||
| Line 43: | Line 43: | ||
halt</pre> | halt</pre> | ||
| + | == Related Commands == | ||
| + | {| style="background:gainsboro; color:black; border: 2px #aaa solid;" | ||
| + | | Width=250px align=center | [[label]] | ||
| + | |} | ||
{{footer}} | {{footer}} | ||
Revision as of 11:29, 3 August 2007
Synopsis
goto {label}
Description
The goto command moves the execution to another part of the script. The destination point is given by a label.
| Note: |
Example
loop: if %donotloop goto exit goto loop exit:
Simulating a Switch Statement
Switch structures (like seen in C/C++) can be simulated in EasyUO using the goto statement:
set %a #random % 3 + 1 goto case , %a case1: display ok One goto case_exit case2: display ok Two goto case_exit case3: display ok Three goto case_exit case_exit: halt
Related Commands
| label |
See also
| Main Page | Documentation |