10 PRINT "PROGRAM FILE 28: EXCEPTION - DIVISION BY ZERO."
20 PRINT "    ANSI STANDARD 7.5"
30 PRINT
40 PRINT "THIS PROGRAM TESTS VARIOUS CASES OF DIVISION BY ZERO."
50 PRINT
60 PRINT "SECTION 28.1: POSITIVE NUMBER DIVIDED BY ZERO."
70 PRINT
80 PRINT "THIS SECTION TESTS THE RESULT OF DIVIDING A POSITIVE "
90 PRINT "QUANTITY BY ZERO."
100 PRINT
110 PRINT "TO PASS THIS TEST:"
120 PRINT
130 PRINT "    1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE"
140 PRINT "       DISPLAYED, AND"
150 PRINT
160 PRINT "    2) POSITIVE INFINITY MUST BE SUPPLIED AS THE VALUE"
170 PRINT "       OF THE EXPRESSION AND EXECUTION CONTINUES."
180 PRINT
190 PRINT "               BEGIN TEST."
200 PRINT
210 LET B=6
220 LET A=5/(B-B)
230 PRINT "VALUE SUPPLIED = ";A
240 PRINT
250 IF A > .99E38 THEN 290
260 PRINT "*** TEST FAILED: VALUE SUPPLIED LESS THAN MINIMUM"
270 PRINT "    POSITIVE MACHINE INFINITY. ***"
280 GOTO 320
290 PRINT "IF VALUE SUPPLIED = POSITIVE MACHINE INFINITY, AND"
300 PRINT "   EXCEPTION REPORTED, THEN"
310 PRINT "*** TEST PASSED ***"
320 PRINT
330 PRINT "                END TEST."
340 PRINT
1060 PRINT "SECTION 28.2: NEGATIVE NUMBER DIVIDED BY ZERO."
1070 PRINT
1080 PRINT "THIS SECTION TESTS THE RESULT OF DIVIDING A NEGATIVE "
1090 PRINT "QUANTITY BY ZERO."
1100 PRINT
1110 PRINT "TO PASS THIS TEST:"
1120 PRINT
1130 PRINT "    1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE"
1140 PRINT "       DISPLAYED, AND"
1150 PRINT
1160 PRINT "    2) NEGATIVE INFINITY MUST BE SUPPLIED AS THE VALUE"
1170 PRINT "       OF THE EXPRESSION AND EXECUTION CONTINUES."
1180 PRINT
1190 PRINT "               BEGIN TEST."
1200 PRINT
1210 LET B=6
1220 LET A=-5/(B-B)
1230 PRINT "VALUE SUPPLIED = ";A
1240 PRINT
1250 IF A < -.99E38 THEN 1290
1260 PRINT "*** TEST FAILED: VALUE SUPPLIED GREATER THAN MINIMUM"
1270 PRINT "    NEGATIVE MACHINE INFINITY. ***"
1280 GOTO 1320
1290 PRINT "IF VALUE SUPPLIED = NEGATIVE MACHINE INFINITY, AND"
1300 PRINT "   EXCEPTION REPORTED, THEN"
1310 PRINT "*** TEST PASSED ***"
1320 PRINT
1330 PRINT "                END TEST."
1340 PRINT
2060 PRINT "SECTION 28.3: ZERO DIVIDED BY ZERO."
2070 PRINT
2080 PRINT "THIS SECTION TESTS THE RESULT OF DIVIDING ZERO BY ZERO."
2100 PRINT
2110 PRINT "TO PASS THIS TEST:"
2120 PRINT
2130 PRINT "    1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE"
2140 PRINT "       DISPLAYED, AND"
2150 PRINT
2160 PRINT "    2) POSITIVE INFINITY MUST BE SUPPLIED AS THE VALUE"
2170 PRINT "       OF THE EXPRESSION AND EXECUTION CONTINUES."
2180 PRINT
2190 PRINT "               BEGIN TEST."
2200 PRINT
2210 LET B=6
2220 LET A=0/(B-B)
2230 PRINT "VALUE SUPPLIED = ";A
2240 PRINT
2250 IF A > .99E38 THEN 2290
2260 PRINT "*** TEST FAILED: VALUE SUPPLIED LESS THAN MINIMUM"
2270 PRINT "    POSITIVE MACHINE INFINITY. ***"
2280 GOTO 2320
2290 PRINT "IF VALUE SUPPLIED = POSITIVE MACHINE INFINITY, AND"
2300 PRINT "   EXCEPTION REPORTED, THEN"
2310 PRINT "*** TEST PASSED ***"
2320 PRINT
2330 PRINT "                END TEST."
2340 PRINT
3000 PRINT "END PROGRAM 28"
3010 END
