10 PRINT "PROGRAM FILE 17: ELEMENTARY USE OF GOSUB AND RETURN."
20 PRINT "    ANSI STANDARD 10.2, 10.4"
30 PRINT
40 PRINT "SECTION 17.1: ELEMENTARY USE OF GOSUB AND RETURN."
50 PRINT
52 PRINT "THIS PROGRAM TESTS THAT THE SUBROUTINE MECHANISM EXISTS"
54 PRINT "AND THAT A SUBROUTINE CAN BE INVOKED FROM SEVERAL"
56 PRINT "PLACES IN THE MAIN LINE OF CONTROL."
58 PRINT
60 PRINT "                           BEGIN TEST."
70 PRINT
80 PRINT "IF THE NEXT MESSAGE '***  GOSUB TEST PASSED  ***' IS"
90 PRINT "SPELLED CORRECTLY, THE TEST PASSED."
100 PRINT
110 GOSUB 1000
120 PRINT "GO";
130 GOSUB 1200
140 PRINT "UB TE";
150 GOSUB 1200
160 PRINT "T PAS";
170 GOSUB 1200
180 PRINT "ED  ***"
190 PRINT
200 PRINT "                           END TEST."
210 PRINT
220 PRINT "END PROGRAM 17"
230 STOP
1000 PRINT "***  ";
1010 RETURN
1200 PRINT "S";
1210 RETURN
1220 END
