Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 466 of 909
The GOTO command is valid from both the serial channels and within a user program. There
are three forms of the command that are valid:
l
GOTO1 — Traditional format
l
GOTO(1) — With parenthesis
l
GOTO(a) — Any variable may be used
The third format allows for highly flexible programs that can jump to an array of different
labels.
EXAMPLE:
C0 'Place main label
IF IN(0)==0
PRINT("Input 0 Low",#13)
ENDIF
GOTO0 'GOTO allows program to run forever
END
RELATED COMMANDS:
BREAK Break from CASE or WHILE Loop (see page 326)
C{number} Command Label (see page 348)
DEFAULT Default Case for SWITCH Structure (see page 382)
ELSE IF-Structure Command Flow Element (see page 421)
GOSUB(label) Subroutine Call (see page 463)
Part 2: Commands: GOTO(label)