10 PRINT "PROGRAM FILE 168: EXCEPTION - OVERFLOW IN THE SUBSCRIPT"
20 PRINT "        OF AN ARRAY."
40 PRINT "    ANSI STANDARD 6.4, 6.5, 7.5"
50 PRINT
60 PRINT "THIS PROGRAM TESTS THAT THE RECOVERY PROCEDURES FOR"
70 PRINT "EXCEPTIONS OCCURRING DURING THE EVALUATION OF NUMERIC"
80 PRINT "EXPRESSIONS WORK PROPERLY IN CONTEXTS OTHER THAN SIMPLE"
90 PRINT "ASSIGNMENT OF THE EXPRESSION TO A VARIABLE. SPECIFICALLY,"
100 PRINT "AN EXPRESSION IS USED AS A SUBSCRIPT OF AN ARRAY."
110 PRINT
120 PRINT "SECTION 168.1: EXCEPTION - OVERFLOW IN THE SUBSCRIPT"
125 PRINT "        OF AN ARRAY."
130 PRINT
140 PRINT "TO PASS THIS TEST:"
150 PRINT
160 PRINT "    1) A MESSAGE IDENTIFYING THE OVERFLOW EXCEPTION MUST"
170 PRINT "       BE DISPLAYED,"
180 PRINT
190 PRINT "    2) POSITIVE INFINITY MUST BE SUPPLIED AS THE VALUE"
200 PRINT "       OF THE SUBSCRIPT AND EXECUTION CONTINUES,"
210 PRINT
220 PRINT "    3) WHEREUPON AN EXCEPTION MUST BE REPORTED"
230 PRINT "       FOR SUBSCRIPT OUT OF RANGE, AND"
240 PRINT
250 PRINT "    4) EXECUTION MUST TERMINATE."
260 PRINT
270 PRINT "                   BEGIN TEST."
280 PRINT
290 FOR I=0 TO 10
300 LET Z(I)=I+100
310 NEXT I
320 LET A=9999
330 PRINT "ABOUT TO EVALUATE Z(9999^9999), WHERE Z(I) = I + 100."
340 PRINT
390 LET C=Z(A^A)
400 PRINT
410 PRINT "RESULT OF Z(9999^9999) = ";C
420 PRINT
430 PRINT "*** TEST FAILED: EXECUTION DID NOT TERMINATE. ***"
440 PRINT
450 PRINT "                    END TEST."
460 PRINT
470 PRINT "END PROGRAM 168"
480 END
