# GOTO

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 Picomite CMM2

Syntax:
GOTO target

Description:
Branches program execution to the target, which can be a line number or a label.

GOTO should usually be avoided, instead using other looping/branching options and SUBS and FUNCTIONs

main:
PRINT "This is the old way"
n = n + 1
IF n < 10 THEN GOTO main
PRINT
n = 0
DO
PRINT "This is better"
n = n + 1
LOOP UNTIL n >= 10
END
Output:
This is the old way
This is the old way
This is the old way
This is the old way
This is the old way
This is the old way
This is the old way
This is the old way
This is the old way
This is the old way
This is better
This is better
This is better
This is better
This is better
This is better
This is better
This is better
This is better
This is better

Last edited: 29 September, 2020