Motion Coordinator Technical Reference Manual
Trio BASIC Commands 8-73
Program Loops and Structures
RETURN
Type:
Program Structure
Description:
Instructs the program to return from a subroutine. Execution continues at the line
following the
GOSUB
instruction.
Note:
Subroutines on each process can be nested up to 8 deep.
Example:
' calculate in subroutine:
GOSUB calc
PRINT "Returned from subroutine"
STOP
calc:
x=y+z/2
RETURN
STEP
Type:
Program Structure
Description:
This optional parameter specifies a step size in a
FOR..NEXT
sequence. See
FOR
.
Example:
FOR x=10 TO 100 STEP 10
MOVEABS(x) AXIS(9)
NEXT x
STOP
Type:
Command
Description:
Stops one program at the current line. A particular program may be specified or the
selected program will be assumed.
Example 1:
>>STOP progname