Page images
PDF
EPUB

110 PRINT "

120 PRINT " 130 PRINT "

140 PRINT

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

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]

270 PRINT "VARIABLE A(I) WAS ASSIGNED 111*I + 5000,' 11

280 PRINT "AND SIMPLE VARIABLE A WAS ASSIGNED 777."

290 PRINT "RESULTS BELOW:"

[blocks in formation]

? ARRAY REFERENCE INCOMPATIBLE WITH PREVIOUS VARIABLE IN LINE 240 ? ARRAY REFERENCE INCOMPATIBLE WITH PREVIOUS VARIABLE IN LINE 380 ? ARRAY REFERENCE INCOMPATIBLE WITH PREVIOUS VARIABLE IN LINE 390

10 PRINT "PROGRAM FILE 78: ERROR - REFERENCE TO ONE-DIMENSIONAL AND "

15 PRINT "1

20 PRINT " 30 PRINT

TWO-DIMENSIONAL VARIABLE OF SAME NAME."

ANSI STANDARD 6.4"

[ocr errors]

40 PRINT "SECTION 78.1: ERROR REFERENCE TO ONE-DIMENSIONAL AND "
50 PRINT "
TWO-DIMENSIONAL VARIABLE OF SAME NAME."

60 PRINT

70 PRINT

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]

310 PRINT "VARIABLE A(I) WAS ASSIGNED 11*I + 5000,"

320 PRINT "AND VARIABLE A(I, J) WAS ASSIGNED 10000+(100*I)+J." 330 PRINT "RESULTS BELOW:"

340 PRINT

350 PRINT "ARRAY VALUES FOR A(I, J):"

360 PRINT "EACH LINE HAS ALL THE ELEMENTS FOR A GIVEN VALUE OF I,"

370 PRINT "WITH J GOING FROM 0 TO 10."

380 PRINT

390 LET C1=0

400 LET C2=0

410 FOR I = 0 TO 10

420 PRINT "I=";I;":";

430 FOR J=0 TO 10

440 PRINT A(I, J);

450 IF A(I, J)=10000+(100*I)+J THEN 470

460 LET C2=9

470 NEXT J

480 PRINT

490 NEXT I

500 PRINT

510 PRINT "ARRAY VALUES FOR A(I):"

520 PRINT

530 FOR I = 0 TO 10

540 PRINT "A(";I;") = ";A(I)

550 IF A(I)=11*I+5000 THEN 570

560 LET C1=9

570 NEXT I

580 IF C1=0 THEN 610

590 PRINT

600 PRINT "***** SOME VALUES IN ONE-DIMENSIONAL ARRAY WERE LOST 610 IF C2=0 THEN 640

620 PRINT

630 PRINT "***** SOME VALUES IN TWO-DIMENSIONAL ARRAY WERE LOST 640 PRINT

[blocks in formation]

? ARRAY REFERENCE INCOMPATIBLE WITH PREVIOUS VARIABLE IN LINE 270 ? ARRAY REFERENCE INCOMPATIBLE WITH PREVIOUS VARIABLE IN LINE 440 ? ARRAY REFERENCE INCOMPATIBLE WITH PREVIOUS VARIABLE IN LINE 450

10 PRINT "PROGRAM FILE 79: ERROR - REFERENCE TO ARRAY"

[blocks in formation]

40 PRINT "SECTION 79.1: ERROR - REFERENCE TO ARRAY"

[blocks in formation]

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]

270 PRINT "VARIABLE A9(1) WAS ASSIGNED 111*I + 5000."

290 PRINT "RESULTS BELOW:"

300 PRINT

360 LET C=0

370 FOR I = 0 TO 10

380 PRINT "A9(";I;") = ";A9(I)

390 IF A9(I)=111*I+5000 THEN 410

400 LET C=9

410 NEXT I

420 IF C=0 THEN 450

430 PRINT

440 PRINT "***** SOME VALUES IN ARRAY WERE LOST ***

[blocks in formation]

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]

340 PRINT "YOU MAY WISH TO REVERSE THE ORDER OF THE OPTION"

350 PRINT "STATEMENTS IN THE SOURCE CODE TO TEST PROCESSOR" 360 PRINT "INTERPRETATION."

[blocks in formation]

470 PRINT

480 PRINT "END PROGRAM 80"

490 END

? DUPLICATE OPTION STATEMENT IN LINE 260

10 PRINT "PROGRAM FILE 81: ERROR - DIM-STATEMENT PRECEDES"

20 PRINT "

30 PRINT "

40 PRINT

50 PRINT *** 60 PRINT "

70 PRINT "

80 PRINT " 90 PRINT

OPTION-STATEMENT."

ANSI STANDARD 15.4"

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 81.1: ERROR 110 PRINT "

120 PRINT

DIM-STATEMENT PRECEDES "

OPTION-STATEMENT."

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."

240 PRINT

[blocks in formation]

290 PRINT "TO HELP IN CHECKING INTERPRETATION, YOU MAY ENTER"

300 PRINT "VALUES TO BE USED AS SUBSCRIPTS ON THE ARRAY. THE PROGRAM"

310 PRINT "WILL ASSIGN THE VALUE 777 TO THE INDICATED ELEMENT AND"

320 PRINT "THEN ECHO THE RESULT. IN THIS WAY YOU CAN CHECK WHICH"

330 PRINT "SUBSCRIPTS ARE WITHIN THE ARRAY AND WHICH CAUSE EXCEPTIONS."

340 PRINT "THE ARRAY IS SET WITH 'DIM A(5)', FOLLOWED BY OPTION BASE 1." 350 PRINT "YOU SHOULD AT LEAST TEST SUBSCRIPT VALUES OF ZERO"

360 PRINT "AND SIX. THE ARRAY HAS BEEN DIMENSIONED AS A(5)."

370 PRINT

380 PRINT "ENTER 100 WHEN YOU WISH TO STOP."

390 PRINT

« PreviousContinue »