10 PRINT "PROGRAM FILE 183: EXCEPTION - EVALUATION OF NUMERIC"
20 PRINT "        EXPRESSIONS IN THE FOR-STATEMENT."
30 PRINT "    ANSI STANDARD 7.5, 11.2"
40 PRINT
50 PRINT "SECTION 183.1: EXCEPTION - EVALUATION OF NUMERIC"
60 PRINT "        EXPRESSIONS IN THE FOR-STATEMENT."
70 PRINT
80 PRINT "THIS SECTION TESTS THE EFFECT OF USING EXPRESSIONS,"
90 PRINT "WHICH CAUSE NON-FATAL EXCEPTIONS, TO CONTROL A"
100 PRINT "FOR-NEXT LOOP."
110 PRINT
120 PRINT "TO PASS THIS TEST:"
130 PRINT
140 PRINT "    1) A DIVISION BY ZERO EXCEPTION MUST BE REPORTED, AND"
160 PRINT
170 PRINT "    2) THE FOR-LOOP MUST EXECUTE 2 TIMES."
180 PRINT
190 PRINT "                   BEGIN TEST."
250 PRINT
260 PRINT "ABOUT TO ATTEMPT EXECUTION OF:"
270 PRINT "   FOR I = ATN((-9) / 0) TO 0"
280 LET J=-1.5707963
300 LET Z=0
310 LET C=-9
320 PRINT
330 PRINT "ITERATION","CONTROL-VARIABLES VALUES"
340 PRINT "COUNT","ACTUAL","SHOULD BE"
350 LET X=0
360 FOR I = ATN(C/Z) TO Z
370 LET X=X+1
380 PRINT X,I,J
390 IF ABS(1-(I/J)) > .01 THEN 530
400 LET J=J+1
410 NEXT I
420 PRINT "EXITING LOOP."
430 LET J=.4293037
435 PRINT " ",I,J
440 IF ABS(1-(I/J)) > .01 THEN 530
450 IF X=2 THEN 490
460 PRINT
470 PRINT "NO. TIMES THROUGH LOOP SHOULD BE 2, ACTUALLY =";X
480 GOTO 550
490 PRINT
500 PRINT "IF ZERO-DIVIDE  REPORTED, THEN"
510 PRINT "*** TEST PASSED ***"
520 GOTO 570
530 PRINT
540 PRINT "CONTROL-VARIABLE SHOULD BE";J;" ACTUALLY =";I
550 PRINT
560 PRINT "***  TEST FAILED  ***"
570 PRINT
580 PRINT "                      END TEST."
590 PRINT
600 PRINT "END PROGRAM 183"
610 END
