{{fbdoc item="title" value="GOTO"}}----
Control flow statement to jump to another part of the program

{{fbdoc item="syntax"}}##
	**Goto** //label//
##
{{fbdoc item="desc"}}
	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 ##[[KeyPgDoloop Do...Loop]]##, ##[[KeyPgFornext For...Next]]##, ##[[KeyPgSub Sub]]##, and ##[[KeyPgFunction Function]]##.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/control/goto.bas"}}%%(freebasic)
	goto there

backagain:
	end

there:
	print "Welcome!"
	goto backagain
%%

{{fbdoc item="filename" value="examples/manual/control/gotonum.bas"}}%%(freebasic)
'' Compile with -lang qb or fblite

'$lang: "qb"

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

{{fbdoc item="lang"}}
	- Line numbers are allowed only in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang deprecated]]// dialects.

{{fbdoc item="diff"}}
	- None

{{fbdoc item="see"}}
	- ##[[KeyPgGosub Gosub]]##
	- ##[[KeyPgSub Sub]]##
	- ##[[KeyPgFunction Function]]##

{{fbdoc item="back" value="CatPgControlFlow|Control Flow"}}