SECTION 6.3: TABBING QUOTED STRINGS. BEGIN TEST. 000000000111111111122222222223333333333444444444455555555556 123456789012345678901234567890123456789012345678901234567890 1 2 3 *** TEST PASSED IF A '1' IS PRINTED BELOW COLUMN HEADING 24, A '2' BELOW 48 AND A '3' BELOW 59 IN THE ABOVE TEST *** END TEST. SECTION 6.4: THE ASSIGNMENT OF QUOTED STRINGS. BEGIN TEST. THIS TEST ASSIGNS THE SAME QUOTED STRING TO ALL LEGAL STRING Z$ = 18 CHARACTERS LONG *** TEST PASSED IF 'Z$ = 18 CHARACTERS LONG' IS PRINTED IN THE ABOVE TEST *** END TEST. SECTION 6.5: SEMICOLON SEPARATOR WITH ASSIGNED STRINGS BEGIN TEST. 1.123 2.123 3.123 4.123 5.123 *** TEST PASSED IF THERE ARE EXACTLY FIVE NUMBERED LINES ABOVE, EACH CONTAINING THE ADJACENT DIGITS '123', AND IF THEY ARE LINED UP IN A COLUMN *** 000000000111111111122222222223333333333444444444455555555556 123456789012345678901234567890123456789012345678901234567890 XYZ XYZ XYZ *** TEST PASSED IF 3 SETS OF THE CHARACTERS 'XYZ' ARE EVENLY SPACED ON A SINGLE LINE IN THE ABOVE TEST AND WIDTH OF PRINT ZONE IS AS DOCUMENTED *** END TEST. SECTION 6.7: TABBING ASSIGNED STRINGS AND CONSTANTS. BEGIN TEST. 000000000111111111122222222223333333333444444444455555555556 123456789012345678901234567890123456789012345678901234567890 1 2 *** TEST PASSED IF A '1' PRINTS BELOW COLUMN HEADING 24, A '2' BELOW 48, AND A '3' BELOW 59 *** END TEST. 3 SECTION 6.8: NULL PRINT ITEMS. THIS TEST DETERMINES WHETHER THE PROCESSOR RECOGNIZES CONSECUTIVE COMMAS IN A PRINT-STATEMENT AS TAB POSITIONS. *** TEST PASSED IF AN 'A' IS IN THE BEGINNING COLUMN OF THE FOURTH PRINT ZONE FOR THIS SYSTEM *** END PROGRAM 6 END TEST. 10 PRINT "PROGRAM FILE 7: EXCEPTION STRING OVERFLOW USING" 15 PRINT " 20 PRINT " 30 PRINT 40 PRINT "SECTION 7.1: EXCEPTION 50 PRINT " STRING OVERFLOW USING" 60 PRINT 70 PRINT "STRING OVERFLOW OCCURS WHEN THE VALUE ASSIGNED TO A STRING" 80 PRINT "VARIABLE CONTAINS MORE CHARACTERS THAN CAN BE RETAINED." 82 PRINT 85 PRINT "TO PASS THIS TEST:" 90 PRINT 95 PRINT " 100 PRINT " 105 PRINT 110 PRINT " 120 PRINT 1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE" 2) STRING OVERFLOW MUST NOT OCCUR" 130 PRINT BEGIN TEST." 140 PRINT 145 PRINT "ABOUT TO ASSIGN STRING OF 19 CHARACTERS 150 LET A$="?*******19********!" 155 PRINT "ABOUT TO ASSIGN STRING OF 20 CHARACTERS 160 LET B$="?********20********!" 165 PRINT "ABOUT TO ASSIGN STRING OF 30 CHARACTERS 11 170 LET C$="?*************30*************!" 175 PRINT "ABOUT TO ASSIGN STRING OF 40 CHARACTERS 195 PRINT "ABOUT TO ASSIGN STRING OF 58 CHARACTERS 11 200 LET F$="?***************** *****58*** 11 11 390 PRINT "IF THE PAIRED LINES IN THE OUTPUT ARE IDENTICAL AND EACH" 400 PRINT " LINE STARTS WITH A QUESTION MARK AND ENDS WITH AN" 410 PRINT " EXCLAMATION POINT, THEN" 420 PRINT "*** TEST PASSED *** 11 440 PRINT 450 PRINT " END TEST." STRING OVERFLOW OCCURS WHEN THE VALUE ASSIGNED TO A STRING TO PASS THIS TEST: 1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE DISPLAYED AND EXECUTION MUST TERMINATE, OR 1) A MESSAGE IDENTIFYING THE EXCEPTIONS MUST BE" 2) THE ARGUMENT TO TAB MUST BE REPLACED WITH A" 110 PRINT "SECTION 8.1: TAB ARGUMENT IS 0." 120 PRINT 130 PRINT " 140 PRINT BEGIN TEST." ** 145 LET A=0 150 PRINT "00000000011111111112222222222333333333344444444445"; 160 PRINT "5555555556" 170 PRINT "12345678901234567890123456789012345678901234567890"; 180 PRINT "1234567890" 190 PRINT TAB(A); "X" 200 PRINT 210 PRINT "*** TEST PASSED IF AN X IS PRINTED IN COLUMN 1, AFTER A " SYSTEM MESSAGE IDENTIFYING THE EXCEPTION 220 PRINT " 230 PRINT 240 PRINT " 250 PRINT END TEST." 260 PRINT "SECTION 8.2: TAB ARGUMENT IS NEGATIVE." 270 PRINT 280 PRINT " 290 PRINT BEGIN TEST." 295 LET A=-10 300 PRINT "00000000011111111112222222222333333333344444444445"; 310 PRINT "5555555556" 320 PRINT "12345678901234567890123456789012345678901234567890"; 330 PRINT "1234567890" 340 PRINT TAB(A);"X" 350 PRINT 360 PRINT "*** TEST PASSED IF AN X IS PRINTED IN COLUMN 1, AFTER A" 440 PRINT "SECTION 8.3: ROUNDED TAB ARGUMENT EQUAL TO ONE." 450 PRINT 460 PRINT " 470 PRINT 475 LET A=.6 BEGIN TEST." 480 PRINT "00000000011111111112222222222333333333344444444445"; 490 PRINT "5555555556" 500 PRINT "12345678901234567890123456789012345678901234567890"; 510 PRINT "1234567890" 590 PRINT "SECTION 8.4: FRACTIONAL TAB ARGUMENT LESS THAN ONE AFTER" 600 PRINT " 610 PRINT ROUNDING." 620 PRINT " 630 PRINT BEGIN TEST." |