« PreviousContinue »
This volume is the companion to Volume 1 which explains the rationale underlying the design of the Version 2 Minimal BASIC Test Programs
and also contains detailed instructions for operating and interpreting the tests. This volume complements the information in Volume 1, by allowing you, first to
exainine the source code in its original form, and second to get an idea of what the output from a standard-conforming implementation should look like. This second purpose is especially important since the implementation under test may not allow Some of the programs to fail gracefully. If you have any doubt about whether the results of a given test signify passing or failing, be sure to check the sample output for that program in this volume.
Because the standard allows certain features to be implementation defined, not all standard processors need produce exactly the same output. You must compare the output of your processor with this sample output carefully, making sure that any variation between the two is within the Scope allowed by the standard. Appendix C of the ANSI standard lists all the features for which implementations may differ.
This volume is ordered according to the sequential numbering system of the programs (see section 6.2 in Volume 1). The source code appears first, preceded by three lines of asterisks. The output for that program follows immediately, separated from the program itself by a line of hyphens. The output is that
which would be produced by a truly minimal standard conforming processor, that is, one which provided for no syntactic enhancements of the Minimal BASIC standard.
10 PRINT "PROGRAM FILE 1: NULL PRINT AND PRINTING QUOTED STRINGS."
MINIMAL BASIC TEST PROGRAMS 130 PRINT "
VERSION 2 135 PRINT" 140 PRINT "
PRODUCT OF 150 PRINT "
NATIONAL BUREAU OF STANDARDS 160 PRINT "
#1 170 PRINT " 180 PRINT 190 PRINT "SECTION 1.1: NULL PRINT. " 200 PRINT 210 PRINT"
BEGIN TEST." 220 PRINT"
THIS IS LINE 1." 230 PRINT "
THIS IS LINE 2." 240 PRINT 250 PRINT !
THIS IS LINE 4, 3 SHOULD HAVE BEEN SKIPPED." 260 PRINT "
THIS IS LINE 5." 270 PRINT 280 PRINT 290 PRINT "
THIS IS LINE 8, 6 AND 7 SHOULD HAVE BEEN SKIPPED." 300 PRINT 310 PRINT "*** TEST PASSED IF LINES 2 AND 4 HAVE A BLANK LINE BETWEEN" 320 PRINT" THEM, AND LINES 5 AND 8 TWO BLANK LINES **** 330 PRINT 340 PRINT"
END TEST." 350 PRINT 360 PRINT "SECTION 1.2: LEGAL CHARACTERS IN PRINTING QUOTED STRINGS." 390 PRINT 400 PRINT "
BEGIN TEST." 410 PRINT 420 PRINT " LINE BELOW MUST PRINT OUT UPPER CASE LETTERS A THROUGH Z" 430 PRINT"
ABCDEFGHIJKLMNOPQRSTUVWXYZ" 440 PRINT 450 PRINT" LINE BELOW MUST PRINT OUT DIGITS ZERO THROUGH NINE." 460 PRINT"
0123456789" 470 PRINT