mk90.basic.statements

Statement GOTO

Continue execution at a numbered source line.

Syntax

GOTO line-number

Parameters

ParameterMeaning
line-numberA literal destination present in the source.

Behavior

The compiler replaces the source line number with an executable byte offset. An absent target is compilation error 34. Runtime branch bounds are checked.

A GOTO does not unwind FOR or GOSUB frames. Avoid jumping into or out of active structured loops or subroutines in a way that leaves unmatched control frames.

Example

10 PRINT "AGAIN"
20 WAIT 32
30 GOTO 10

Limits and diagnostics

No computed GOTO, ON ... GOTO or labels made of names. SU+C stops an infinite loop at a runtime cancellation poll.

Status-code reference.

See also

IF · GOSUB · WAIT · Language syntax