10 PRINT "PROGRAM FILE 114: EVALUATION OF ABS FUNCTION."
20 PRINT "    ANSI STANDARD 8.4"
30 PRINT
40 PRINT "SECTION 114.1: EVALUATION OF ABS FUNCTION."
50 PRINT
60 PRINT "THIS SECTION TESTS WHETHER THE ABS NUMERIC-SUPPLIED-FUNCTION"
70 PRINT "RETURNS THE ABSOLUTE VALUE FOR A VARIETY OF ARGUMENTS."
100 PRINT
110 PRINT "                BEGIN TEST"
120 PRINT
130 LET F=0
140 PRINT " ","CORRECT","ACTUAL","TEST"
150 PRINT "ARGUMENT","VALUE","VALUE","RESULT"
160 PRINT
170 READ A,V
180 IF A=999 THEN 290
190 LET V1=ABS(A)
200 IF V=V1 THEN 270
240 LET F=F+1
250 PRINT A,V,V1,"FAIL"
260 GOTO 170
270 PRINT A,V,V1," OK "
280 GOTO 170
290 PRINT
300 IF F=0 THEN 330
310 PRINT "*** TEST FAILED IN ";F;" CASE(S) ***"
320 GOTO 340
330 PRINT "*** TEST PASSED ***"
340 PRINT
350 PRINT "               END TEST"
360 PRINT
370 PRINT "END PROGRAM 114"
380 DATA -2,2,-1,1,+0,0,-0,0,1,1,2,2,2.1,2.1,2.9,2.9,-2.1,2.1,-2.9,2.9
390 DATA -1.23E22,1.23E22,3.21E-11,3.21E-11,9.99E37,9.99E37
400 DATA -9.99E37,9.99E37,1E38,1E38,-1E38,1E38,1E-38,1E-38
410 DATA -1E-38,1E-38,-1.01E-38,1.01E-38,.001,.001,-.001,.001
420 DATA 999,999
430 END
