10 PRINT "PROGRAM FILE 174: EXCEPTION - EVALUATION OF NUMERIC"
20 PRINT "        EXPRESSIONS IN THE PRINT STATEMENT."
30 PRINT "    ANSI STANDARD 7.5, 8.5, 12.2"
40 PRINT
50 PRINT "THIS PROGRAM TESTS THE EFFECT OF THE VARIOUS EXCEPTIONS THAT"
60 PRINT "CAN OCCUR IN NUMERIC EXPRESSIONS IN THE CONTEXT OF THE PRINT"
70 PRINT "STATEMENT."
80 PRINT
90 PRINT "SECTION 174.1: EXCEPTIONAL EXPRESSIONS AS PRINT-ITEMS."
100 PRINT
110 PRINT "THIS SECTION TESTS THE EFFECT OF PRINTING EXPRESSIONS WHICH"
120 PRINT "CAUSE NON-FATAL EXCEPTIONS."
130 PRINT
160 PRINT "TO PASS THIS TEST:"
170 PRINT
180 PRINT "    1) FOUR EXCEPTIONS MUST BE REPORTED; OVERFLOW, DIVISION"
190 PRINT "       BY ZERO, ZERO RAISED TO A NEGATIVE POWER, AND"
195 PRINT "       OVERFLOW OF EXP FUNCTION, AND"
200 PRINT
210 PRINT "    2) NEGATIVE, NEGATIVE, POSITIVE, AND POSITIVE MACHINE"
220 PRINT "       INFINITY MUST BE SUPPLIED AS THE VALUES OF THE"
230 PRINT "       EXPRESSIONS AND THEN PRINTED."
240 PRINT
242 PRINT "                   BEGIN TEST."
246 PRINT
250 PRINT "ABOUT TO EXECUTE:"
260 PRINT "   PRINT (-1E-33) ^ (-3333), (-1E-33) / 0, 0 ^ (-1E-33)";
265 PRINT ", EXP(1E20)"
270 LET A=0
280 LET B=-3333
290 LET C=-1E-33
295 LET D=1E20
300 PRINT
310 PRINT C^B, C/A, A^C, EXP(D)
320 PRINT
330 PRINT "IF FOUR EXCEPTIONS REPORTED AND NEGATIVE, NEGATIVE,"
340 PRINT "   POSITIVE, AND POSITIVE INFINITY PRINTED, THEN"
350 PRINT "*** TEST PASSED ***"
360 PRINT
370 PRINT "                    END TEST."
380 PRINT
390 PRINT "SECTION 174.2: EXCEPTIONAL EXPRESSIONS AS TAB-ITEMS."
400 PRINT
410 PRINT "THIS SECTION TESTS THE EFFECT OF OVERFLOW IN A TAB-ITEM."
420 PRINT
430 PRINT "TO PASS THIS TEST:"
440 PRINT
450 PRINT "    1) THE OVERFLOW EXCEPTION MUST BE REPORTED, AND"
460 PRINT
470 PRINT "    2) EXECUTION CONTINUES, WITH THE TAB EVALUATING TO"
480 PRINT "       SOME ARBITRARY PRINT POSITION."
490 PRINT
500 PRINT "                    BEGIN TEST."
510 PRINT
520 PRINT "ABOUT TO EXECUTE:"
530 PRINT "   PRINT TAB(9^(9^9));X$"
540 PRINT "   (WHERE X$ = 'X')"
550 PRINT
560 PRINT "0000000001111111111222222222233333333334444444444";
570 PRINT "55555555556666666666777"
580 PRINT "1234567890123456789012345678901234567890123456789";
590 PRINT "01234567890123456789012"
600 LET X$="X"
610 LET D=9
620 PRINT TAB(D^(D^D));X$
630 PRINT
640 PRINT "IF OVERFLOW EXCEPTION REPORTED, AND 'X' APPEARED FOLLOWING"
650 PRINT "   NUMBERED LINES, THEN"
660 PRINT "*** TEST PASSED ***"
670 PRINT
680 PRINT "                    END TEST."
690 PRINT
700 PRINT "END PROGRAM 174"
710 END
