◄QuickSCREEN► ◄Details► ◄Example► ◄Contents► ◄Index► ────────────────────────────────────────────────────────────────────────────── GOSUB...RETURN Statement Programming Example This example shows the correct use of RETURN linelabel statements. CLS ' Clear screen PRINT "in module-level code" GOSUB Sub1 PRINT "this line in main routine should be skipped" Label1: PRINT "back in module-level code" END Sub1: PRINT "in subroutine one" GOSUB Sub2 PRINT "this line in subroutine one should be skipped" Label2: PRINT "back in subroutine one" RETURN Label1 Sub2: PRINT "in subroutine two" RETURN Label2 'Cannot return from here to main 'program - only to SUB1. Sample Output in module-level code in subroutine one in subroutine two back in subroutine one back in module-level code