Label
A label is a word followed by a colon, on a line of its own. goto jumps to the line
after it.
set %n 0mainloop: set %n %n + 1 if %n < 3 goto mainloopdisplay ok Went round %n times.halt- Names: case does not matter, and
gotocan leave out the colon:goto mainloop. - Nothing else on the line except a comment (
mainloop: ; main loop). The label line itself runs nothing, so a command written after the label on the same line is ignored. - Duplicate names are allowed, but
gototakes the nearest one. Seegoto.
See also
Based on the EasyUO wiki, edited for EasyUO Reforged. This text is available under the GNU Free Documentation License 1.2.