Page images
PDF
EPUB

480 PRINT "LINE BELOW MUST PRINT OUT, IN THE FOLLOWING ORDER, LEFT" 490 PRINT "PARENTHESIS, RIGHT PARENTHESIS, AMPERSAND, EXCLAMATION" 500 PRINT "POINT, NUMBER SIGN, PERCENT, APOSTROPHE, QUESTION MARK," 510 PRINT "ASTERISK, AND DOLLAR SIGN."

520 PRINT "

530 PRINT

()&!#%'?*$"

540 PRINT "LINE BELOW MUST PRINT OUT, IN THE FOLLOWING ORDER, PLUS," 550 PRINT "COMMA, MINUS, SLANT, LESS-THAN, EQUALS, GREATER-THAN," 560 PRINT "CIRCUMFLEX, AND PERIOD."

570 PRINT "

580 PRINT

+,-/<=>^."

590 PRINT "LINE BELOW MUST PRINT OUT, IN THE FOLLOWING ORDER, COLON," 600 PRINT "SPACE, SEMI-COLON, AND UNDERLINE."

610 PRINT "

620 PRINT

: ;_"

630 PRINT "*** TEST PASSED IF THE ABOVE SPECIFICATIONS WERE MET ***" 640 PRINT

650 PRINT "

660 PRINT

END TEST."

670 PRINT "SECTION 1.3: SPACES IN QUOTED STRINGS."

[blocks in formation]

750 PRINT "*** TEST PASSED IF THE SECOND LINE OF ALPHA CHARACTERS IN "

760 PRINT "

770 PRINT "

775 PRINT " 780 PRINT

790 PRINT "

800 PRINT

THE ABOVE TEST HAS BLANKS WHERE THE LETTERS B, E, F,"
I, J, K, N, O, P, Q, T, U, V, W, AND X APPEAR IN THE "
FIRST LINE. ***"

END TEST."

810 PRINT "SECTION 1.4: PRINTING THE NULL STRING."

830 PRINT

840 PRINT "

850 PRINT

BEGIN TEST."

870 PRINT "THE NEXT STATEMENT PRINTS A NULL QUOTED STRING." 890 PRINT "

900 PRINT "THE LINE ABOVE MUST BE BLANK AS A RESULT OF PRINTING" 910 PRINT "A NULL QUOTED STRING."

920 PRINT

930 PRINT "*** TEST PASSED IF THE ABOVE SPECIFICATIONS WERE MET ***" 940 PRINT

950 PRINT "

960 PRINT

970 PRINT "END PROGRAM 1"

980 END

END TEST."

PROGRAM FILE 1: NULL PRINT AND PRINTING QUOTED STRINGS.

ANSI STANDARD 3.2, 3.4, 5.2, 5.4, 12.2, 12.4

*** NOTE: THIS PROGRAM MAKES USE OF THE END STATEMENT

WHICH HAS NOT YET BEEN TESTED. IF SUBSEQUENT TESTS SHOW
THIS FEATURE TO BE INCORRECTLY IMPLEMENTED, THEN THE
VALIDITY OF THE RESULTS OF THIS TEST ROUTINE IS DOUBTFUL.

MINIMAL BASIC TEST PROGRAMS
VERSION 2

PRODUCT OF

NATIONAL BUREAU OF STANDARDS

SECTION 1.1: NULL PRINT.

BEGIN TEST.

THIS IS LINE 1.

THIS IS LINE 2.

THIS IS LINE 4, 3 SHOULD HAVE BEEN SKIPPED.
THIS IS LINE 5.

THIS IS LINE 8, 6 AND 7 SHOULD HAVE BEEN SKIPPED.

*** TEST PASSED IF LINES 2 AND 4 HAVE A BLANK LINE BETWEEN THEM, AND LINES 5 AND 8 TWO BLANK LINES ***

END TEST.

SECTION 1.2: LEGAL CHARACTERS IN PRINTING QUOTED STRINGS.

BEGIN TEST.

LINE BELOW MUST PRINT OUT UPPER CASE LETTERS A THROUGH Z
ABCDEFGHIJKLMNOPQRSTUVWXYZ

LINE BELOW MUST PRINT OUT DIGITS ZERO THROUGH NINE.

0123456789

LINE BELOW MUST PRINT OUT, IN THE FOLLOWING ORDER, LEFT
PARENTHESIS, RIGHT PARENTHESIS, AMPERSAND, EXCLAMATION
POINT, NUMBER SIGN, PERCENT, APOSTROPHE, QUESTION MARK,
ASTERISK, AND DOLLAR SIGN.

() &!#%'?*$

LINE BELOW MUST PRINT OUT, IN THE FOLLOWING ORDER, PLUS,
COMMA, MINUS, SLANT, LESS-THAN, EQUALS, GREATER-THAN,
CIRCUMFLEX, AND PERIOD.

+,-/<=>^

LINE BELOW MUST PRINT OUT, IN THE FOLLOWING ORDER, COLON,
SPACE, SEMI-COLON, AND UNDERLINE.

: ;_

*** TEST PASSED IF THE ABOVE SPECIFICATIONS WERE MET ***

[blocks in formation]

*** TEST PASSED IF THE SECOND LINE OF ALPHA CHARACTERS IN
THE ABOVE TEST HAS BLANKS WHERE THE LETTERS B, E, F,
I, J, K, N, O, P, Q, T, U, V, W, AND X APPEAR IN THE
FIRST LINE. ***

END TEST.

SECTION 1.4: PRINTING THE NULL STRING.

BEGIN TEST.

THE NEXT STATEMENT PRINTS A NULL QUOTED STRING.

THE LINE ABOVE MUST BE BLANK AS A RESULT OF PRINTING

A NULL QUOTED STRING.

*** TEST PASSED IF THE ABOVE SPECIFICATIONS WERE MET ***

[blocks in formation]

60 PRINT "THIS PROGRAM TESTS TO SEE IF THE PROCESSOR TERMINATES" 70 PRINT "THE BASIC PROGRAM WHEN IT ENCOUNTERS AN END STATEMENT." 80 PRINT

90 PRINT "

100 PRINT

BEGIN TEST."

110 PRINT "*** TEST PASSES IF 'END PROGRAM 2' IS THE LAST OUTPUT"

120 PRINT "

125 PRINT "

130 PRINT

GENERATED BY THIS PROGRAM, FOLLOWED BY NORMAL "
TERMINATION OF EXECUTION. ***"

140 PRINT "

150 PRINT

160 PRINT "END PROGRAM 2" 170 END

END TEST."

PROGRAM FILE 2: THE END-STATEMENT.

ANSI STANDARD 4.2, 4.4

SECTION 2.1: THE END-STATEMENT.

THIS PROGRAM TESTS TO SEE IF THE PROCESSOR TERMINATES
THE BASIC PROGRAM WHEN IT ENCOUNTERS AN END STATEMENT.

BEGIN TEST.

*** TEST PASSES IF 'END PROGRAM 2' IS THE LAST OUTPUT GENERATED BY THIS PROGRAM, FOLLOWED BY NORMAL TERMINATION OF EXECUTION. ***

END PROGRAM 2

***

END TEST.

10 PRINT "PROGRAM FILE 3: ERROR MISPLACED END-STATEMENT." 20 PRINT "

30 PRINT

ANSI STANDARD 4.2, 4.4"

40 PRINT "SECTION 3.1: ERROR

50 PRINT

MISPLACED END-STATEMENT."

60 PRINT "THIS PROGRAM TESTS TO SEE IF THE BASIC PROCESSOR"

70 PRINT "ACCEPTS PROGRAMS CONTAINING AN END STATEMENT WHICH IS" 80 PRINT "NOT PHYSICALLY LAST."

90 PRINT

100 PRINT "THIS IS A TEST FOR A NON-STANDARD FEATURE OF MINIMAL BASIC." 110 PRINT "TO PASS THIS TEST, THE PROCESSOR MUST EITHER:"

120 PRINT

130 PRINT " 1) ACCEPT THE PROGRAM AND BE ACCOMPANIED BY DOCUMENTATION" 140 PRINT " ACCURATELY DESCRIBING THE FEATURE'S INTERPRETATION" BY THE PROCESSOR, OR"

150 PRINT "

160 PRINT

170 PRINT " 2) REJECT THE PROGRAM WITH AN APPROPRIATE ERROR MESSAGE" 180 PRINT

190 PRINT "SEE THE NBS MINIMAL BASIC TEST PROGRAMS USER'S MANUAL" 200 PRINT "FOR DETAILED CRITERIA."

210 PRINT

220 PRINT "

230 PRINT

BEGIN TEST."

240 PRINT "IF THIS SENTENCE IS THE LAST SENTENCE PRINTED, THE PROCESSOR"
250 PRINT "DID NOT EXECUTE ANY MORE STATEMENTS AFTER ENCOUNTERING AN"
260 PRINT "END-STATEMENT IN THE MIDDLE OF THE PROGRAM."

270 END

280 PRINT

290 PRINT "IF THIS SENTENCE IS PRINTED OUT, THE PROCESSOR CONTINUED TO"
300 PRINT "EXECUTE STATEMENTS AFTER ENCOUNTERING AN END-STATEMENT"
310 PRINT "IN THE MIDDLE OF THE PROGRAM."

[blocks in formation]

60 PRINT "THIS PROGRAM TESTS TO SEE IF THE BASIC PROCESSOR"

70 PRINT "ACCEPTS PROGRAMS WHICH DO NOT CONTAIN AN END STATEMENT." 80 PRINT

90 PRINT "THIS IS A TEST FOR A NON-STANDARD FEATURE OF MINIMAL BASIC." 100 PRINT "TO PASS THIS TEST, THE PROCESSOR MUST EITHER:"

110 PRINT

120 PRINT " 1) ACCEPT THE PROGRAM AND BE ACCOMPANIED BY DOCUMENTATION"
130 PRINT " ACCURATELY DESCRIBING THE FEATURE'S INTERPRETATION"
BY THE PROCESSOR, OR"

140 PRINT "

150 PRINT

160 PRINT " 2) REJECT THE PROGRAM WITH AN APPROPRIATE ERROR MESSAGE" 170 PRINT

180 PRINT "SEE THE NBS MINIMAL BASIC TEST PROGRAMS USER'S MANUAL" 190 PRINT "FOR DETAILED CRITERIA."

200 PRINT

210 PRINT "

220 PRINT

BEGIN TEST."

230 PRINT "THE PROCESSOR IS EXECUTING A PROGRAM WHICH DOES NOT CONTAIN" 240 PRINT "AN END STATEMENT."

250 PRINT

260 PRINT "

270 PRINT

280 PRINT "END PROGRAM 4"

END TEST."

? NO END INSTRUCTION

***

« PreviousContinue »