Page images
PDF
EPUB

130 PRINT " 140 PRINT " 150 PRINT 160 PRINT " 170 PRINT "

180 PRINT

190 PRINT "

200 PRINT

210 DIM B(3,12)

1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE"
DISPLAYED, AND"

2) THE PROGRAM MUST TERMINATE UPON USE OF THE ILLEGAL" SUBSCRIPT."

220 FOR I=9 TO 14

BEGIN TEST."

[blocks in formation]

PROGRAM FILE 66: EXCEPTION SUBSCRIPT TOO LARGE FOR
TWO-DIMENSIONAL ARRAY, WITH DIM.

ANSI STANDARD 6.5, 15.2, 15.4

SECTION 66.1: EXCEPTION SUBSCRIPT TOO LARGE FOR
TWO-DIMENSIONAL ARRAY, WITH DIM.

THE OBJECT OF THIS TEST IS TO SEE WHETHER THE PROCESSOR
RECOGNIZES A FATAL EXCEPTION WHEN A SUBSCRIPT EXCEEDS
THE EXPLICIT UPPER BOUND OF AN ARRAY.

TO PASS THIS TEST:

1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE
DISPLAYED, AND

2) THE PROGRAM MUST TERMINATE UPON USE OF THE ILLEGAL
SUBSCRIPT.

BEGIN TEST.

ABOUT TO ASSIGN TO B(0, 9). ASSIGNMENT SHOULD BE OK.
HAVE ASSIGNED 11 TO B(0, 9).

ABOUT TO ASSIGN TO B(0, 10 ). ASSIGNMENT SHOULD BE OK.
HAVE ASSIGNED 10 TO B(0, 10 ).

ABOUT TO ASSIGN TO B(0, 11 ). ASSIGNMENT SHOULD BE OK.
HAVE ASSIGNED 9 TO B(0, 11 ).

ABOUT TO ASSIGN TO B(0, 12). ASSIGNMENT SHOULD BE OK.
HAVE ASSIGNED 8 TO B(0, 12 ).

ABOUT TO ASSIGN TO B(0, 13 ).*** EXCEPTION SHOULD OCCUR NOW ***

? DIMENSION ERROR IN LINE 280

10 PRINT "PROGRAM FILE 67: EXCEPTION SUBSCRIPT TOO SMALL FOR"
15 PRINT "
ONE-DIMENSIONAL ARRAY, WITH OPTION BASE 1."
20 PRINT " ANSI STANDARD 6.5, 15.2, 15.4"
30 PRINT

40 PRINT "SECTION 67.1: EXCEPTION
50 PRINT "

60 PRINT

SUBSCRIPT TOO SMALL FOR"
ONE-DIMENSIONAL ARRAY, WITH OPTION BASE 1."

70 PRINT "THE OBJECT OF THIS TEST IS TO SEE WHETHER THE PROCESSOR"

80 PRINT "RECOGNIZES USE OF A ZERO SUBSCRIPT AS A FATAL EXCEPTION WHEN" 90 PRINT "OPTION BASE 1 HAS BEEN SPECIFIED."

100 PRINT

110 PRINT "TO PASS THIS TEST:"

120 PRINT

130 PRINT " 140 PRINT " 150 PRINT

160 PRINT " 170 PRINT "

180 PRINT

190 PRINT "

1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE"
DISPLAYED, AND"

2) THE PROGRAM MUST TERMINATE UPON USE OF THE ZERO"
SUBSCRIPT."

BEGIN TEST."

250

[blocks in formation]

200 PRINT

210 OPTION BASE 1

220 FOR I=3 TO -2 STEP -1

230

PRINT "ABOUT TO ASSIGN TO A(";I;").";

240 IF I>O THEN 270

PRINT "*** EXCEPTION SHOULD OCCUR NOW ***"

PRINT " ASSIGNMENT SHOULD BE OK."

PRINT "HAVE ASSIGNED ";20-I;" TO A(";I;")."

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

******

****

**

360 PRINT

370 PRINT "END PROGRAM 67" 380 END

PROGRAM FILE 67: EXCEPTION

[ocr errors]

SUBSCRIPT TOO SMALL FOR

ONE-DIMENSIONAL ARRAY, WITH OPTION BASE 1.

ANSI STANDARD 6.5, 15.2, 15.4

SECTION 67.1: EXCEPTION

SUBSCRIPT TOO SMALL FOR

ONE-DIMENSIONAL ARRAY, WITH OPTION BASE 1.

THE OBJECT OF THIS TEST IS TO SEE WHETHER THE PROCESSOR
RECOGNIZES USE OF A ZERO SUBSCRIPT AS A FATAL EXCEPTION WHEN
OPTION BASE 1 HAS BEEN SPECIFIED.

TO PASS THIS TEST:

1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE DISPLAYED, AND

2) THE PROGRAM MUST TERMINATE UPON USE OF THE ZERO SUBSCRIPT.

BEGIN TEST.

ABOUT TO ASSIGN TO A( 3 ). ASSIGNMENT SHOULD BE OK.
HAVE ASSIGNED 17 TO A( 3 ).

ABOUT TO ASSIGN TO A( 2 ). ASSIGNMENT SHOULD BE OK.
HAVE ASSIGNED 18 TO A 2).
A(

ABOUT TO ASSIGN TO A( 1 ). ASSIGNMENT SHOULD BE OK.

HAVE ASSIGNED 19 TO A( 1 ).

ABOUT TO ASSIGN TO A( 0 ).*** EXCEPTION SHOULD OCCUR NOW ***

? DIMENSION ERROR IN LINE 280

***

10 PRINT "PROGRAM FILE 68: EXCEPTION SUBSCRIPT TOO LARGE FOR" 15 PRINT "

ONE-DIMENSIONAL ARRAY, WITH DIM AND OPTION BASE 1."

20 PRINT " ANSI STANDARD 6.5, 15.2, 15.4"

30 PRINT

40 PRINT "SECTION 68.1: EXCEPTION 50 PRINT "

60 PRINT

[blocks in formation]

ONE-DIMENSIONAL ARRAY, WITH DIM AND OPTION BASE 1."

****

70 PRINT "THE OBJECT OF THIS TEST IS TO SEE WHETHER THE PROCESSOR" 80 PRINT "RECOGNIZES A FATAL EXCEPTION WHEN A SUBSCRIPT EXCEEDS" 90 PRINT "THE EXPLICIT UPPER BOUND OF AN ARRAY, WITH AN OPTION" 100 PRINT "STATEMENT PRESENT."

110 PRINT

120 PRINT "TO PASS THIS TEST:"

130 PRINT

140 PRINT " 150 PRINT " 160 PRINT

170 PRINT "

180 PRINT "

190 PRINT

1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE"
DISPLAYED, AND"

2) THE PROGRAM MUST TERMINATE UPON USE OF THE ILLEGAL" SUBSCRIPT."

[blocks in formation]

330

340

350 NEXT I

360 PRINT

370 PRINT "

PRINT "ASSIGNMENT TO SUBSCRIPT > 7 *** TEST FAILS ***11
PRINT

END TEST."

380 PRINT

390 PRINT "END PROGRAM 68" 400 END

PROGRAM FILE 68: EXCEPTION

SUBSCRIPT TOO LARGE FOR
ONE-DIMENSIONAL ARRAY, WITH DIM AND OPTION BASE 1.
ANSI STANDARD 6.5, 15.2, 15.4

SECTION 68.1: EXCEPTION SUBSCRIPT TOO LARGE FOR

ONE-DIMENSIONAL ARRAY, WITH DIM AND OPTION BASE 1.

THE OBJECT OF THIS TEST IS TO SEE WHETHER THE PROCESSOR
RECOGNIZES A FATAL EXCEPTION WHEN A SUBSCRIPT EXCEEDS
THE EXPLICIT UPPER BOUND OF AN ARRAY, WITH AN OPTION
STATEMENT PRESENT.

TO PASS THIS TEST:

1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE
DISPLAYED, AND

2) THE PROGRAM MUST TERMINATE UPON USE OF THE ILLEGAL SUBSCRIPT.

BEGIN TEST.

ABOUT TO ASSIGN TO A( 5 ). ASSIGNMENT SHOULD BE OK.
HAVE ASSIGNED 15 TO A( 5 ).

ABOUT TO ASSIGN TO A( 6 ). ASSIGNMENT SHOULD BE OK.
HAVE ASSIGNED 14 TO A( 6 ).

ABOUT TO ASSIGN TO A( 7 ). ASSIGNMENT SHOULD BE OK.

HAVE ASSIGNED 13 TO A( 7 ).

ABOUT TO ASSIGN TO A( 8 ) *** EXCEPTION SHOULD OCCUR NOW ***

[ocr errors]

? DIMENSION ERROR IN LINE 300

** **

10 PRINT "PROGRAM FILE 69: EXCEPTION SUBSCRIPT TOO LARGE FOR"
15 PRINT "
TWO-DIMENSIONAL ARRAY, WITH DIM AND OPTION BASE 0."
ANSI STANDARD 6.5, 15.2, 15.4"

20 PRINT"

30 PRINT

40 PRINT "SECTION 69.1: EXCEPTION SUBSCRIPT TOO LARGE FOR" 50 PRINT "

60 PRINT

TWO-DIMENSIONAL ARRAY, WITH DIM AND OPTION BASE 0."

70 PRINT "THE OBJECT OF THIS TEST IS TO SEE WHETHER THE PROCESSOR"
80 PRINT "RECOGNIZES A FATAL EXCEPTION WHEN A SUBSCRIPT EXCEEDS"
90 PRINT "THE EXPLICIT UPPER BOUND OF AN ARRAY, WITH AN OPTION"
100 PRINT "STATEMENT PRESENT."

110 PRINT

120 PRINT "TO PASS THIS TEST:"

130 PRINT

140 PRINT " 150 PRINT " 160 PRINT

170 PRINT "

180 PRINT "

190 PRINT

200 PRINT "

1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE"
DISPLAYED, AND"

2) THE PROGRAM MUST TERMINATE UPON USE OF THE ILLEGAL"
SUBSCRIPT."

BEGIN TEST."

[blocks in formation]

**

« PreviousContinue »