
Commands - 109
RETURN
Statement
SYNTAX: RETURN [line/label]
RETURN ITR number
PURPOSE: To resume execution after a GOSUB, interrupt, multitasking or communications call. The RETURN
ITR reenables the interru pt.
REMARK S: RETURN is used as a return from a GOSUB call. Program execution continues at the statement
following the GO SUB.
number is 0 or 1, or as limited by your hardware. It is the interrupt number that the subroutine
declared by ON ITR n declared.
If the optional line/ label is specified, the progr am will branch to the specified line/ label.
RETURN ITR is used as a return fro m an ON ITR GOSU B declaration. In this case the return is to
the next statement where the interrupt occurred. The hardware interrupt is reenabled. If ITR
number is left off, the return is still to the next statement where the interrupt occurred. However,
interrupt number is disabled until a RETURN ITR number is executed or ON IT R GO SUB is
declared again. This is useful when you want to recognize an interrupt once and enable it again at
some later time.
RELATED: GOSUB, ON ITR
EXAMPLE: 10 ON ITR 0 GOSUB 40
20 A=23 : 'This is a dummy loop
30 GOTO 20
40 PRINT "Interrupt"
50 RETURN ITR 0
ERROR: < RETURN w/o GOSUB> – if no corresponding GOSUB
< Can’t compile> – if line/label does not exist
< Data out of range> - if number is not 0 or 1 when used with ITR
< Expected (> - if number is missing when used with an ITR
Comentários a estes Manuais