RETURN

RETURN


reserved words Index Level REWIND
Syntax RETURN
RETURN {TO statement.label}
Category BASIC
Type Statement
Description terminates an internal or external subroutine and returns execution control to the statement following the invoking "call" or "gosub" statement.

The "to" clause may only be used with an internal subroutine, and transfers control to the specified statement label. This is not considered a good programming practice.
Options
See Also GOSUB ON ... GOSUB CALL SUBROUTINE statement labels
Example input answer
if answer = 'y' then gosub 1000
print 'back again'
stop
1000 * subroutine
print 'ok'
return

In this example, if the answer is "y" then call internal subroutine 1000.  When 1000 is complete, control is "returned" to the line which prints "back again".
Warnings
Compatibility D3 7.0 AP R83
reserved words Index Level REWIND