RETURNReturns to the program line following the last GOSUB line.
Description:
The GOSUB statement transfers control to a subroutine; the RETURN statement transfers control back to the next statement following the GOSUB. You can have many GOSUBs to the same subroutine and a RETURN occurring in that subroutine returns control to the statement following the specific GOSUB used to get to the subroutine. You can only enter a subroutine by using GOSUB. If you don't use GOSUB, the RETURN statement causes an error when executed.
The RETURN keyword is also used to return values from user-defined functions. See DEF FN for an explanation of RETURN used in this way.
See Also:
|