1770 PRINT -1.23456,89123.4,-2.34567 1780 PRINT +295.65,.023,-67.8954 1790 PRINT 1810 PRINT " 1800 PRINT "*** TEST PASSED IF THE FIRST THREE PRINT ZONES EACH CONTAIN" A COLUMN OF REAL NUMBERS USING EXPLICIT POINT," UNSCALED REPRESENTATION ***" 1820 PRINT " 1825 PRINT 1830 PRINT " 1840 PRINT END TEST." 1850 PRINT "SECTION 9.8: SPACE ALLOTMENT FOR PRINTED NR2 NUMBERS." 1860 PRINT 1870 PRINT "PRINTED NR2 CONSTANTS ARE PRECEDED BY A SPACE IF POSITIVE" 1880 PRINT "OR BY A MINUS IF NEGATIVE, AND ARE FOLLOWED BY A SPACE." 1890 PRINT "THE FIELDS FOR THE CONSTANTS ARE DELIMITED BY ASTERISKS." 1900 PRINT 1910 PRINT " 1920 PRINT BEGIN TEST." 1930 PRINT "00000000011111111112222222222333333333344444444445"; 1940 PRINT "5555555556666666666777" 1950 PRINT "12345678901234567890123456789012345678901234567890"; 1970 PRINT "*":90000.1;"*","*"; .000123; "*","*";.000009; "* 2010 PRINT "*";.234567; "*","*":1.23456;"*","*":91.2345;"*" 2050 PRINT "*";865.789;"*","*";1234.56;"*","*":99999.9;"*n 2090 PRINT "*** TEST PASSED IF EACH NUMBER IS PRECEDED BY A SPACE OR" 2100 PRINT " A MINUS SIGN, AND FOLLOWED BY A SPACE AND THE NUMBERS" USE EXPLICIT POINT, UNSCALED REPRESENTATION ***" 2110 PRINT " PROGRAM FILE 9: PRINTING NR1 AND NR2 NUMERIC CONSTANTS. ANSI STANDARD 5.2, 5.4, 12.4 SECTION 9.1: CONSTANTS IN NR1 FORM (INTEGERS). COLUMNS 1 AND 3 SHOW THE OUTPUT AS IT SHOULD BE. COLUMNS 2 AND 4 SHOW THE ACTUAL OUTPUT. BEGIN TEST. *** TEST PASSED IF COLUMNS 1 & 2, AND 3 & 4 CONTAIN THE SAME NUMERIC REPRESENTATION FOR EACH PAIR OF INTEGERS *** END TEST. SECTION 9.2: NR1 CONSTANTS SEPARATED BY COMMAS TO PRODUCE *** TEST PASSED IF THE FIRST THREE PRINT ZONES EACH CONTAIN A COLUMN OF INTEGERS *** END TEST. SECTION 9.3: SPACE ALLOTTED FOR PRINTED INTEGER CONSTANTS. PRINTED INTEGER CONSTANTS ARE PRECEDED BY A SPACE IF *** TEST PASSED IF 'ACTUAL' LINES MATCH CORRESPONDING 'SHOULD BE' LINES *** END TEST. SECTION 9.4: NR1 CONSTANTS SEPARATED BY SEMICOLONS. PRINTED INTEGER CONSTANTS ARE PRECEDED BY A SPACE IF *** TEST PASSED IF 'ACTUAL' LINE MATCHES CORRESPONDING 'SHOULD BE' LINE *** END TEST. SECTION 9.5: CONSTANTS IN NR2 FORM. COLUMNS 1 AND 3 SHOW THE OUTPUT AS IT SHOULD BE. EXPECTED OUTPUT IS DISPLAYED WITH TRAILING ZEROS *** TEST PASSED IF COLUMNS 1 & 2, AND 3 & 4 CONTAIN THE END TEST. SECTION 9.6: USING NR2 INSTEAD OF NR3 FORMAT FOR NUMBERS THAT CAN BE REPRESENTED IN THE UNSCALED SCALED FORMAT, SHALL BE OUTPUT USING THE UNSCALED FORMAT. *** TEST PASSED IF COLUMNS 1 & 2, AND 3 & 4 CONTAIN THE END TEST. SECTION 9.7: NR2 CONSTANTS SEPARATED BY COMMAS TO PRODUCE *** TEST PASSED IF THE FIRST THREE PRINT ZONES EACH CONTAIN A COLUMN OF REAL NUMBERS USING EXPLICIT POINT, UNSCALED REPRESENTATION *** END TEST. SECTION 9.8: SPACE ALLOTMENT FOR PRINTED NR2 NUMBERS. PRINTED NR2 CONSTANTS ARE PRECEDED BY A SPACE IF POSITIVE BEGIN TEST. 000000000111111111122222222223333333333444444444455555555556666666666777 123456789012345678901234567890123456789012345678901234567890123456789012 90000.1 # * .000123 * * .000009 * * 900.001 * * .000123 * * .000009 * 91.2345 * * 91.2345 * *-91.2345 * * 99999.9 * *** TEST PASSED IF EACH NUMBER IS PRECEDED BY A SPACE OR A MINUS SIGN, AND FOLLOWED BY A SPACE AND THE NUMBERS USE EXPLICIT POINT, UNSCALED REPRESENTATION *** END PROGRAM 9 **** 黃黃 END TEST. 10 PRINT "PROGRAM FILE 10: PRINTING NR3 NUMERIC CONSTANTS." 20 PRINT " 30 PRINT ANSI STANDARD 5.2, 5.4, 12.4" 60 PRINT "THESE TESTS ASSUME THAT A MINIMUM OF SIX SIGNIFICANT DIGITS" 70 PRINT "WILL BE PRINTED. PROCESSORS WHICH PRINT MORE SIGNIFICANT" 80 PRINT "DIGITS SHOULD HAVE COMPARABLE ACCURACY." 90 PRINT 91 PRINT "NOTE THAT THE DISPLAYED STANDARD OUTPUT IS ORIENTED TO" 92 PRINT "THE MINIMAL REQUIREMENTS OF SIGNIFICAND-WIDTH, D, " 93 PRINT "EQUAL TO SIX, AND EXRAD-WIDTH, E, EQUAL TO TWO. FOR D> 6" 94 PRINT "AND E > 2, THERE MAY BE EXTRA TRAILING AND LEADING ZEROS," 95 PRINT "RESPECTIVELY." 96 PRINT 97 PRINT "SECTION 10.1: POSITIVE NUMBER AND SIGNED SIGNIFICAND." 98 PRINT |