3 -- Grant of Unlimited Rights
5 -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6 -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
7 -- unlimited rights in the software and documentation contained herein.
8 -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
9 -- this public release, the Government intends to confer upon all
10 -- recipients unlimited rights equal to those held by the Government.
11 -- These rights include rights to use, duplicate, release or disclose the
12 -- released technical data and computer software in whole or in part, in
13 -- any manner and for any purpose whatsoever, and to have or permit others
18 -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19 -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
20 -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21 -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
22 -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23 -- PARTICULAR PURPOSE OF SAID MATERIAL.
26 -- CHECK THAT READ, WRITE, INDEX, SET_INDEX, SIZE, AND
27 -- END_OF_FILE RAISE STATUS_ERROR WHEN APPLIED TO A NON-OPEN
28 -- DIRECT FILE. USE_ERROR IS NOT PERMITTED.
37 -- GMT 08/03/87 CLARIFIED SOME OF THE FAILED MESSAGES, AND
38 -- REMOVED THE EXCEPTION FOR CONSTRAINT_ERROR.
40 WITH REPORT
; USE REPORT
;
45 PACKAGE DIR
IS NEW DIRECT_IO
(INTEGER);
48 CNST
: CONSTANT INTEGER := 101;
52 P_COUNT
: POSITIVE_COUNT
;
55 TEST
("CE2402A","CHECK THAT READ, WRITE, INDEX, " &
56 "SET_INDEX, SIZE, AND END_OF_FILE " &
57 "RAISE STATUS_ERROR WHEN APPLIED " &
58 "A NON-OPEN DIRECT FILE");
61 FAILED
("STATUS_ERROR WAS NOT RAISED ON WRITE - 1");
66 FAILED
("USE_ERROR RAISED ON WRITE - 2");
68 FAILED
("UNEXPECTED EXCEPTION RAISED ON WRITE - 3");
72 X_COUNT
:= SIZE
(FILE1
);
73 FAILED
("STATUS_ERROR NOT RAISED ON SIZE - 4");
78 FAILED
("USE_ERROR RAISED ON SIZE - 5");
80 FAILED
("UNEXPECTED EXCEPTION RAISED ON SIZE - 6");
84 BOOL
:= END_OF_FILE
(FILE1
);
85 FAILED
("STATUS_ERROR WAS NOT RAISED ON END_OF_FILE - 7");
90 FAILED
("USE_ERROR RAISED ON END_OF_FILE - 8");
92 FAILED
("WRONG EXCEPTION RAISED ON END_OF_FILE - 9");
96 P_COUNT
:= INDEX
(FILE1
);
97 FAILED
("STATUS_ERROR WAS NOT RAISED ON INDEX - 10");
102 FAILED
("USE_ERROR RAISED ON INDEX - 11");
104 FAILED
("WRONG EXCEPTION RAISED ON INDEX - 12");
109 FAILED
("STATUS_ERROR WAS NOT RAISED ON READ - 13");
114 FAILED
("USE_ERROR RAISED ON READ - 14");
116 FAILED
("WRONG EXCEPTION RAISED ON READ - 15");
120 ONE
: POSITIVE_COUNT
:= POSITIVE_COUNT
(IDENT_INT
(1));
123 WRITE
(FILE1
, CNST
, ONE
);
124 FAILED
("STATUS_ERROR NOT RAISED ON WRITE - 16");
129 FAILED
("USE_ERROR RAISED ON WRITE - 17");
131 FAILED
("WRONG EXCEPTION RAISED ON WRITE - 18");
135 SET_INDEX
(FILE1
,ONE
);
136 FAILED
("STATUS_ERROR NOT RAISED ON SET_INDEX - 19");
141 FAILED
("USE_ERROR RAISED ON SET_INDEX - 20");
143 FAILED
("WRONG EXCEPTION RAISED ON SET_INDEX - 21");
147 READ
(FILE1
, IVAL
, ONE
);
148 FAILED
("STATUS_ERROR WAS NOT RAISED ON READ - 22");
153 FAILED
("USE_ERROR RAISED ON READ - 23");
155 FAILED
("WRONG EXCEPTION RAISED ON READ - 24");