10 PRINT "PROGRAM FILE 88: THE ON-GOTO-STATEMENT."
20 PRINT "    ANSI STANDARD 10.2, 10.4"
30 PRINT
60 PRINT "SECTION 88.1: THE ON-GOTO EXPRESSION WITH INTEGER VALUES."
80 PRINT
90 PRINT "                               BEGIN TEST."
100 PRINT
120 LET N=0
130 FOR I=1 TO 5
140 REM 3RD DIGIT OF LINE NUMBER IS ITS POSITION IN LIST
150 ON I  GOTO 221, 252, 213, 244, 235
160 PRINT "CONTROL FELL THROUGH ON-GOTO"
170 GOTO 280
213 IF I=3 THEN 290
218 LET K=3
219 GOTO 270
221 IF I=1 THEN 290
228 LET K=1
229 GOTO 270
235 IF I=5 THEN 290
238 LET K=5
239 GOTO 270
244 IF I=4 THEN 290
248 LET K=4
249 GOTO 270
252 IF I=2 THEN 290
258 LET K=2
259 GOTO 270
270 PRINT "CONTROL WENT TO LINE #";K;" IN LIST EVEN THOUGH ON-GOTO";
275 PRINT " EXPRESSION = ";I
280 LET N=1
290 NEXT I
300 PRINT
310 IF N=0 THEN 340
320 PRINT "***  TEST FAILED  ***"
330 GOTO 350
340 PRINT "***  TEST PASSED  ***"
350 PRINT
360 PRINT "                                 END TEST."
370 PRINT
375 PRINT
380 PRINT "SECTION 88.2: THE ON-GOTO EXPRESSION WITH FRACTIONAL VALUES."
400 PRINT
410 PRINT "THIS SECTION TESTS THAT FRACTIONAL VALUES ARE ROUNDED"
420 PRINT "TO THE NEAREST INTEGER BY THE ON-GOTO BEFORE SELECTION"
425 PRINT "OF THE LINE-NUMBER FROM THE LIST."
430 PRINT
440 PRINT "                               BEGIN TEST."
450 PRINT
500 LET N=0
510 FOR I=0.6 TO 3.4 STEP .2
530 ON I GOTO 600,700,800
540 PRINT "CONTROL FELL THROUGH ON-GOTO."
550 GOTO 950
600 LET K=1
610 IF I<.5 THEN 900
620 IF I>1.5 THEN 900
630 GOTO 1000
700 LET K=2
710 IF I<1.5 THEN 900
720 IF I>2.5 THEN 900
730 GOTO 1000
800 LET K=3
810 IF I<2.5 THEN 900
820 IF I>3.5 THEN 900
830 GOTO 1000
900 PRINT "CONTROL WENT TO LINE #";K;" IN LIST, BUT ON-GOTO";
910 PRINT " EXPRESSION = ";I
950 LET N=1
1000 NEXT I
1010 PRINT
1020 IF N=0 THEN 1050
1030 PRINT "***  TEST FAILED  ***"
1040 GOTO 1060
1050 PRINT "***  TEST PASSED  ***"
1060 PRINT
1070 PRINT "                                END TEST."
1260 PRINT
1270 PRINT "END PROGRAM 88"
1280 END
