Site hosted by Angelfire.com: Build your free website today!
NAME
  GOSUB...RETURN Statement

SYNOPSIS
  GOSUB line1
  .
  .
  .
  RETURN [line2]
      o line1    The label or line number of the first line of the subroutine.
      o line2    The label or line number where the subroutine returns.
      o If you don't supply a label or line number for RETURN, the program
        continues execution at the statement following the GOSUB (for
        subroutine calls) or where an event occurred (for event handling).
        See the  ON  keyword for information about event-handling statements.
      o SUB and CALL statements provide a better alternative to GOSUB
        subroutines.

DESCRIPTION
  Branches to and returns from a subroutine.

  Example:
      FOR i% = 1 TO 20
          GOSUB Square
      NEXT i%
      END
      Square:
      PRINT i%, i% * i%
      RETURN

SEE ALSO
  CALL ON ON...GOSUB SUB