Goto (Basic4GL)

Goto

( Basic4GL 2.4.10 up )

Goto - goto a label

Description

Examples

Jumping Out of a For Loop

Goto can be used to jump out of a For loop :

Dim i

For i = 1 To 10
    Printr i
    If i = 5 Then Goto ExitLoop EndIf
Next

ExitLoop:
End

Related Pages

  • Gosub - goto a subroutine.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 2.5 License.