Page images
PDF
EPUB

400 PRINT "ENTER VALUE TO BE USED AS SUBSCRIPT:"

[blocks in formation]

10 PRINT "PROGRAM FILE 82: ERROR ARRAY-REFERENCE PRECEDES" 20 PRINT "

OPTION-STATEMENT."

30 PRINT " ANSI STANDARD 15.4"

40 PRINT

50 PRINT "SECTION 82.1: ERROR 60 PRINT"

ARRAY-REFERENCE PRECEDES"

70 PRINT

OPTION-STATEMENT."

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

100 PRINT

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

130 PRINT "

140 PRINT

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

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

[blocks in formation]

220 PRINT "ABOUT TO EXECUTE 'LET A(0) = 105'"

230 PRINT "'OPTION BASE 1' FOLLOWS THIS STATEMENT."

[blocks in formation]

**** *******

***

[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]

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

130 PRINT

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

160 PRINT "

170 PRINT

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

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

[blocks in formation]

260 PRINT "ABOUT TO EXECUTE 'LET A(6) = 777'"

270 PRINT "'DIM A(5)' FOLLOWS THIS STATEMENT." 280 PRINT

[blocks in formation]

****

**

10 PRINT "PROGRAM FILE 84: ERROR

20 PRINT "

30 PRINT "

40 PRINT

50 PRINT "***

60 PRINT "

70 PRINT "

80 PRINT " 90 PRINT

MORE THAN ONCE."

ANSI STANDARD 15.4"

DIMENSIONING THE SAME ARRAY "

NOTE: THIS PROGRAM MAKES USE OF THE INPUT 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."

100 PRINT "SECTION 84.1: ERROR 110 PRINT "

120 PRINT

DIMENSIONING THE SAME ARRAY

MORE THAN ONCE."

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

150 PRINT

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

180 PRINT "

190 PRINT

200 PRINT" 2) REJECT THE PROGRAM WITH AN APPROPRIATE ERROR MESSAGE" 210 PRINT

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

[blocks in formation]

270 PRINT "IN ORDER TO DETERMINE WHAT INTERPRETATION IS GIVEN TO A"
280 PRINT "DOUBLY-DIMENSIONED ARRAY, YOU MUST EXECUTE THIS PROGRAM"
290 PRINT "THREE TIMES, AND NOTE EACH TIME WHETHER A SUBSCRIPT-OUT-"
300 PRINT "OF-RANGE EXCEPTION OCCURS. THE TABLE BELOW GIVES THE"
310 PRINT "EXPECTED RESULTS FOR EACH OF FIVE POSSIBLE INTERPRETATIONS."
320 PRINT

330 PRINT "RESULTS WHICH DO NOT MATCH ANY OF THE ROWS IN THE TABLE"
340 PRINT "INDICATE THAT SOME OTHER INTERPRETATION IS BEING USED."
350 PRINT

360 PRINT "TABLE OF RESULTS: THE THREE COLUMNS STAND FOR 1ST, 2ND, AND"
370 PRINT "3RD EXECUTION, AND THE FIVE ROWS STAND FOR FIVE POSSIBLE"
380 PRINT "INTERPRETATIONS."

[blocks in formation]

490 PRINT "INTERPRETATION NUMBER 1 IS THAT THE FIRST DIM-STATEMENT IN"
500 PRINT "THE SOURCE CODE GOVERNS THE SIZE OF THE ARRAY."
510 PRINT

520 PRINT "INTERPRETATION NUMBER 2 IS THAT THE DIM-STATEMENT MOST"
530 PRINT "RECENTLY PRECEDING AN ARRAY REFERENCE IN THE SOURCE CODE"
540 PRINT "DETERMINES THE SIZE OF THE ARRAY AT THAT REFERENCE."
550 PRINT

560 PRINT "INTERPRETATION NUMBER 3 IS THAT THE LAST DIM-STATEMENT IN"
570 PRINT "THE SOURCE CODE DETERMINES THE SIZE OF THE ARRAY."
580 PRINT

590 PRINT "INTERPRETATION NUMBER 4 IS THAT THE FIRST DIM-STATEMENT"
600 PRINT "EXECUTED DETERMINES THE SIZE OF THE ARRAY."

610 PRINT

620 PRINT "INTERPRETATION NUMBER 5 IS THAT THE DIM-STATEMENT MOST"

630 PRINT "RECENTLY EXECUTED DETERMINES THE SIZE OF THE ARRAY." 640 LET S=13

650 PRINT

660 PRINT "IS THIS THE 1ST, 2ND, OR 3RD EXECUTION (RESPOND 1, 2, OR 3)?" 670 INPUT I

[blocks in formation]

10 PRINT "PROGRAM FILE 85: GENERAL CAPABILITIES OF GOSUB/RETURN." 20 PRINT " ANSI STANDARD 10.4"

30 PRINT

40 PRINT "SECTION 85.1: SIMPLE NESTING OF GOSUBS."

50 PRINT

60 PRINT "THIS SECTION TESTS THAT SUBROUTINES MAY CALL ONE ANOTHER" 70 PRINT "AND THAT A SUBROUTINE MAY BE CALLED FROM SEVERAL PLACES." 80 PRINT

[blocks in formation]

***** ***

400 LET F=0

500 LET X=0

510 GOSUB 570

520 IF X=11 THEN 530 525 LET F=1

530 LET X=0

540 GOSUB 600

550 IF X=8 THEN 560

555 LET F=1

560 GOTO 700

570 LET X=X+8

580 GOSUB 640 590 RETURN

600 GOSUB 640

610 GOSUB 670

620 LET X=X+4 630 RETURN

640 LET X=X+2

650 GOSUB 670

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

1030 PRINT "SECTION 85.2: STACKING OF RETURN ADDRESSES." 1040 PRINT

1050 PRINT "THIS SECTION TESTS THAT RETURN ADDRESSES ARE PROPERLY" 1060 PRINT "STACKED BY GOSUBS (INCLUDING SEVERAL EXECUTIONS OF THE" 1070 PRINT "SAME GOSUB) AND UNSTACKED BY CORRESPONDING RETURNS." 1080 PRINT

[blocks in formation]
« PreviousContinue »