[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GOSUB                    Execute Subroutine

 GOSUB {linenum1 | linelabel1}
 .
 . [statements]
 .
 RETURN [{linenum2 | linelabel2}]

    Causes program execution to branch to the specified line number or
    line label; when the RETURN statement is encountered, execution
    branches to the statement immediately following the most recent GOSUB
    statement--or to a specified line number or line label.

   ----------------------------------------------------------------------

      Notes:    If RETURN linenumber2 or linelabel2 is used, the return
                must be made to a statement in the calling routine--i.e.,
                the main program or the subroutine from which the current
                subroutine was called.

                Subroutines may be called any number of times, from any
                number of different points in a program. They may be
                nested, and they may have multiple RETURN statements.

See Also: DEF FN RETURN SUB...END SUB
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson