GOTO Statement

Unconditionally transfers program control to another statement within the DataBasic program.

Syntax

GO{TO} statement-label

Syntax Elements

statement-label is the label of the statement where control is to be transferred.

Operation

Control is transferred to the statement with the specified statement-label.

If statement-label does not exist, an error is printed at compile time.

See Also

GOSUB statement.

Example

100 A=0
.
.
.
* BRANCH TO STATEMENT 500
200 GOTO 500
.
.
.
500 A=B+C
D=100
.
.
.
* REPEAT PROGRAM
GO 100

Transfers control from the statement at label 200 to the statement at label 500. Execution continues sequentially until the GO 100 statement transfers control back to the statement at label 100.