This script is from the help file discussion on goto:
proc main
integer Loops = 0 ; Integer to count loops.
Label: ; Define a label to jump to.
Loops++ ; Increment our loop counter.
if Loops < 3 ; If the number of loops is still
goto Label ; less than 3, jump to label.
endif
usermsg "%d" Loops ; Display number of loops.
endproc
The way goto works is that it jumps to the label specified. In the example above, the line that says "Label:" is where the script would jump.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.