RETURN (Statement)


Return control from a subroutine.


RETURN


This statement returns control to the caller program after the end of execution of the subroutine called by a GOSUB statement.



DIM li1 As Integer
IF li1 = 0 THEN
'If li1 is 0
STOP
'Stop program execution
ELSEIF li1 = 1 THEN
'If li1 is 1
GOTO *samp1
'Jump to the label *samp1
GO TO *samp2
'Jump to the label *samp2
ELSEIF li1 = 2 THEN
'If li1 is 2
GOSUB *samp3
'Call the subroutine beginning with the label name *samp3
ELSE
'If li1 is any other value
RETURN
'Return to the caller program
END IF
'Declare the end of the IF statement


Top