Goto

Control flow statement to jump to another part of the program

Syntax
	Goto label

Description
	Jumps code execution to a line label.

	When using Goto label to exit a scope, any local variables defined in 
	that scope are destroyed (destructors are called).

	Usage of Goto label may be disallowed when it skips a variable 
	definition but not the end of the variable's scope. If the variable 
	requires construction, a compiler error is shown. For other variables, a 
	compiler warning is shown. This is intended to prevent potential 
	accesses to uninitialized variables, and ensures that automatic 
	destruction never happens to an uninitialized variable.

	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.

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
	* Line numbers are allowed only in the CompilerOptlang-lang qb and CompilerOptlang-lang deprecated 
	  dialects.
	* In the CompilerOptlang-lang qb and CompilerOptlang-lang fblite dialects, Goto label is allowed to 
	  skip any variable definitions, because nested scopes are not supported 
	  and all variable definitions are moved to the top of their procedure.

Differences from QB
	* None

See also
	* KeyPgGosubGoSub
	* KeyPgSubSub
	* KeyPgFunctionFunction
	* ProPgLabelsLabels

