10 PRINT "PROGRAM FILE 184: EXCEPTION - UNDERFLOW IN THE EVALUATION"
20 PRINT "        OF NUMERIC EXPRESSIONS IN THE FOR-STATEMENT."
30 PRINT "    ANSI STANDARD 7.4, 7.6, 11.2"
40 PRINT
50 PRINT "SECTION 184.1: EXCEPTION - UNDERFLOW IN THE EVALUATION"
60 PRINT "        OF NUMERIC EXPRESSIONS IN THE FOR-STATEMENT."
70 PRINT
80 PRINT "THIS SECTION TESTS THE EFFECT OF UNDERFLOW IN NUMERIC"
90 PRINT "EXPRESSIONS IN THE CONTEXT OF THE FOR STATEMENT."
100 PRINT
110 PRINT "TO PASS THIS TEST:"
120 PRINT
130 PRINT "    1) AN UNDERFLOW EXCEPTION MAY BE REPORTED"
140 PRINT "       (NOT MANDATORY),"
150 PRINT
160 PRINT "    2) ZERO MUST BE SUPPLIED AS THE VALUE OF THE "
170 PRINT "       EXPRESSION, AND"
180 PRINT
190 PRINT "    3) THE FOR-LOOP MUST EXECUTE 4 TIMES."
200 PRINT
210 PRINT "                   BEGIN TEST."
220 PRINT
230 PRINT "ABOUT TO EXECUTE:"
240 PRINT "   FOR I = .1 ^ 99999 TO 1E-36 STEP 3E-37"
250 LET J=0
260 LET C=99999
270 PRINT
280 PRINT "ITERATION","CONTROL-VARIABLE VALUES"
290 PRINT "COUNT","ACTUAL","SHOULD BE"
300 LET X=0
310 FOR I = .1^C TO 1E-36 STEP 3E-37
320 LET X=X+1
330 PRINT X,I,J
340 IF J<>0 THEN 370
350 IF I=0 THEN 380
360 GOTO 510
370 IF ABS(1-(I/J)) > .01 THEN 510
380 LET J=J+3E-37
390 NEXT I
400 PRINT "EXITING LOOP."
410 LET J=12E-37
420 PRINT " ",I,J
430 IF ABS(1-(I/J)) > .01 THEN 510
440 IF X=4 THEN 480
450 PRINT
460 PRINT "NO. TIMES THROUGH LOOP SHOULD BE 4, ACTUALLY =";X
470 GOTO 530
480 PRINT
490 PRINT "*** TEST PASSED ***"
500 GOTO 550
510 PRINT
520 PRINT "CONTROL-VARIABLE SHOULD BE ";J;" ACTUALLY = ";I
530 PRINT
540 PRINT "***  TEST FAILED  ***"
550 PRINT
560 PRINT "                    END TEST."
570 PRINT
580 PRINT "END PROGRAM 184"
590 END
