PROGRAM FILE 24: PLUS AND MINUS ANSI STANDARD 7.2, 7.4 THIS PROGRAM TESTS THE GROSS SEMANTIC CHARACTERISTICS OF THE PLUS AND MINUS OPERATORS FOR THE CONSTRUCTION OF NUMERIC EXPRESSIONS. EXPRESSIONS USING ONLY ONE OPERATOR AND CONSTANTS AND SIMPLE VARIABLES ARE EVALUATED, AND THE RESULTS TESTED AGAINST THE CORRECT VALUE. CONSTANTS ARE EXPRESSED IN NR1, NR2, AND NR3 FORM, BUT ARE GENERALLY RESTRICTED TO INTEGER VALUES TO AVOID ACCURACY PROBLEMS (ACCURACY IS ADDRESSED IN LATER TESTS). 10 PRINT "PROGRAM FILE 25: MULTIPLY, DIVIDE, AND INVOLUTE" 20 PRINT " 30 PRINT ANSI STANDARD 7.2, 7.4" 40 PRINT "THIS PROGRAM TESTS THE GROSS SEMANTIC CHARACTERISTICS OF" 70 PRINT 80 PRINT "EXPRESSIONS USING ONLY ONE OPERATOR AND CONSTANTS AND" 140 PRINT *** 150 LET M$="25.1: MULTIPLY" 160 GOSUB 7000 170 LET N$="CONSTANTS" 180 LET O$="1" 190 LET A=3*7 200 LET Y=21 220 GOSUB 8500 230 LET A=5.0*14 240 LET O$="2" 250 LET Y=70 270 GOSUB 8500 280 LET A=6.000*2.3E+1 290 LET 0$="3" 300 LET Y=138 320 GOSUB 8500 330 LET N$="VAR. & CONSTS." 340 LET A=-37 350 LET A=A*3 440 LET Y=-30 460 GOSUB 8500 470 LET C=-12E-0 480 LET B=-110E-1 490 LET O$="6" 500 LET A=B*C 510 LET Y=132 530 GOSUB 8500 540 LET C=-3 550 LET B=-0 560 LET A=C*B 570 LET 0$="7" 580 LET Y=0 600 GOSUB 8500 610 LET A=C*C 620 LET 0$="8" 630 LET Y=9 650 GOSUB 8500 660 LET B=4 670 LET A=B*4.0 680 LET O$="9" 690 LET Y=16 710 GOSUB 8500 720 GOSUB 8000 730 LET M$="25.2: DIVIDE" 740 GOSUB 7000 750 LET N$="CONSTANTS" 760 LET 0$="1" 770 LET A=12/3 780 LET Y=4 790 GOSUB 8500 820 LET Y=2 830 GOSUB 8500 840 LET A=0.0/7 850 LET 0$="3" 860 LET Y=0 870 GOSUB 8500 880 LET N$="VARS. & CONSTS." 882 LET B=63 884 LET C-9 886 LET A=B/C 890 LET 0$="4" 900 LET Y=7 910 GOSUB 8500 915 LET B=-49 1010 GOSUB 8500 1020 LET B=-111 1030 LET 0$="7" 1040 LET C=-3 1060 LET A=B/C 1070 LET Y=37 1080 GOSUB 8500 1090 LET B=-8 1100 LET A=0/B 1110 LET 0$="8" 1120 LET Y=0 1130 GOSUB 8500 1140 LET C=7 1150 LET A=C/2 1160 LET O$="9" 1170 LET Y=3.5 1180 GOSUB 8500 1190 LET B=-26 1200 LET C=-5 1210 LET A=B/C 1220 LET O$="10" 1230 LET Y=5.2 1240 GOSUB 8500 2000 GOSUB 8000 2010 LET M$="25.3: INVOLUTION" 2020 LET N$="CONSTANTS" 2030 GOSUB 7000 2040 LET A=3^2 2050 LET 0$="1" 2070 GOSUB 8500 2090 LET 0$="2" 2100 LET Y=64 2110 GOSUB 8500 2120 LET A=50^0.0 2130 LET 0$="3" 2140 LET Y=1 2150 GOSUB 8500 2155 LET N$="VAR. & CONSTS." 2160 LET B=3 2162 LET C=4 2165 LET A=B^C 2170 LET O$="4" 2180 LET Y=81 2190 GOSUB 8500 2210 LET B=-2 2220 LET C=3 2230 LET A=B C 2240 LET 0$="5" 2250 LET Y=-8 2260 GOSUB 8500 2270 LET B=-3 2290 LET A=B^2.0 2300 LET O$="6" 2310 LET Y=9 2320 GOSUB 8500 2330 LET C=4 2350 LET A=0°C 2360 LET 0$="7" 2370 LET Y=0 2380 GOSUB 8500 2390 LET B=4 2400 LET A=B^0 2410 LET O$="8" 2420 LET Y=1 2430 GOSUB 8500 2440 LET B=0 2445 LET C=0.0 2450 LET A=B^C 2460 LET O$="9" 2470 LET Y=1 2480 GOSUB 8500 2490 LET B=40E-1 2500 LET C=1.0 2510 LET A=B^C 2520 LET O$="10" 2530 LET Y=4 2540 GOSUB 8500 2550 LET B=-1 2560 LET A=4^B 2570 LET 0$="11" 2580 LET Y=.25 |