RETURN

Purpose : Indicates the end of the execution of a subroutine.

Format: RETURN

Notes:  The  RETURN  statement is used to end the execution a subroutine called by the  GOSUB  statement.  Program execution is resumed at following line after the calling  GOSUB  statement.

Examples:

# Subroutine Return Example.
# Execute a GOSUB...RETURN 10 times

loop_count = 0

*TOP_OF_LOOP

print " This line is executed prior to the GoSub"

gosub my_sub

print " This line is executed after each Call. "

loop = loop + 1
if loop_count < 10
goto top_of_loop
endif

# This is the listing of the subroutine

*My_Sub
print " All I do is print the loop #: " loop
RETURN

See Also:  GOSUB