10 PRINT "PROGRAM FILE 30: EXCEPTION - OVERFLOW OF NUMERIC CONSTANTS."
20 PRINT "    ANSI STANDARD 5.4, 5.5"
30 PRINT
40 PRINT "THIS PROGRAM TESTS VARIOUS CASES OF CONSTANT OVERFLOW."
50 PRINT
60 PRINT "SECTION 30.1: POSITIVE CONSTANT OVERFLOW"
70 PRINT
80 PRINT "THIS SECTION TESTS THE RESULT OF CONSTANT EVALUATION"
90 PRINT "EXCEEDING POSITIVE MACHINE INFINITY."
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 CONSTANT AND EXECUTION CONTINUES."
180 PRINT
190 PRINT "               BEGIN TEST"
200 PRINT
360 LET A=3E99999
365 PRINT "RESULT OF ASSIGNING E399999 = ";A
370 IF A>.99E38 THEN 410
380 PRINT "*** TEST FAILED: VALUE SUPPLIED LESS THAN MINIMUM"
390 PRINT "    POSITIVE MACHINE INFINITY. ***"
400 GOTO 440
410 REM RESULT > MINIMUM
420 PRINT "IF (RESULT = 3E99999) OR "
425 PRINT "   (RESULT = POSITIVE INFINITY AND EXCEPTION REPORTED)"
430 PRINT "*** TEST PASSED *** OTHERWISE *** TEST FAILED ***"
440 PRINT
450 PRINT "                END TEST"
460 PRINT
470 PRINT "SECTION 30.2: NEGATIVE CONSTANT OVERFLOW"
480 PRINT
490 PRINT "THIS SECTION TESTS THE RESULT OF CONSTANT EVALUATION"
500 PRINT "EXCEEDING NEGATIVE MACHINE INFINITY."
510 PRINT
520 PRINT "TO PASS THIS TEST:"
530 PRINT
540 PRINT "    1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE"
550 PRINT "       DISPLAYED, AND"
560 PRINT
570 PRINT "    2) NEGATIVE INFINITY MUST BE SUPPLIED AS THE VALUE"
580 PRINT "       OF THE CONSTANT AND EXECUTION CONTINUES."
590 PRINT
600 PRINT "               BEGIN TEST"
610 PRINT
770 LET A=-3E99999
775 PRINT "RESULT OF ASSIGNING -3E99999 = ";A
780 IF A<-.99E38 THEN 820
790 PRINT "*** TEST FAILED: VALUE SUPPLIED GREATER THAN MINIMUM"
800 PRINT "    NEGATIVE MACHINE INFINITY. ***"
810 GOTO 850
820 REM RESULT < MAXIMUM
830 PRINT "IF (RESULT = -3E99999) OR "
835 PRINT "   (RESULT = NEGATIVE INFINITY AND EXCEPTION REPORTED)"
840 PRINT "*** TEST PASSES *** OTHERWISE *** TEST FAILS *** "
850 PRINT
860 PRINT "                END TEST"
870 PRINT
880 PRINT "END PROGRAM 30"
890 END
