Goto
 
Control flow statement to jump to another part of the program

Syntax

Goto label

Description

Jumps code execution to a line label.

For better source code readability, overuse of Goto should be avoided in favor of more modern structures such as Do...Loop, For...Next, Sub, and Function.

Example

    Goto there

backagain:
    End

there:
    Print "Welcome!"
    Goto backagain


'' Compile with -lang qb or fblite

'$lang: "qb"

1 Goto 3
2 End
3 Print "Welcome!"
4 Goto 2


Dialect Differences

Differences from QB

  • None

See also