Page images
PDF
EPUB

Introduction

[ocr errors]

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.

[ocr errors]

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.

[merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small]
[merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors]

12.2

Approximated functions:
SQR, ATN, COS, EXP, LOG, SIN, TAN .....117-129

307

[merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small]
[merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small]

**

***

[ocr errors]

10 PRINT "PROGRAM FILE 1: NULL PRINT AND PRINTING QUOTED STRINGS."
20 PRINT " ANSI STANDARD 3.2, 3.4, 5.2, 5.4, 12.2, 12.4"
30 PRINT
40 PRINT "*** NOTE: THIS PROGRAM MAKES USE OF THE END STATEMENT"
50 PRINT " WHICH HAS NOT YET BEEN TESTED. IF SUBSEQUENT TESTS SHOW"
60 PRINT THIS FEATURE TO BE INCORRECTLY IMPLEMENTED, THEN THE"
70 PRINT " VALIDITY OF THE RESULTS OF THIS TEST ROUTINE IS DOUBTFUL."
80 PRINT
90 PRINT
100 PRINT"

in
110 PRINT "
120 PRINT"

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

n

« PreviousContinue »