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.
25 -- CHECK THAT THE COMPONENTS OF ACCESS IN PARAMETERS CAN BE USED AS THE
26 -- TARGET OF AN ASSIGNMENT STATEMENT OR AS AN ACTUAL PARAMETER OF
27 -- ANY MODE. SUBTESTS ARE:
28 -- (A) INTEGER ACCESS TYPE.
29 -- (B) ARRAY ACCESS TYPE.
30 -- (C) RECORD ACCESS TYPE.
42 TEST
("C62002A", "CHECK THAT COMPONENTS OF ACCESS IN PARAMETERS" &
43 " MAY BE USED IN ASSIGNMENT CONTEXTS");
45 --------------------------------------------------
49 TYPE PTRINT
IS ACCESS INTEGER;
52 PROCEDURE PROCA
(PI
: IN PTRINT
) IS
54 PROCEDURE PROCA1
(I
: OUT INTEGER) IS
59 PROCEDURE PROCA2
(I
: IN OUT INTEGER) IS
69 FAILED
("ASSIGNMENT TO COMPONENT OF INTEGER" &
70 " ACCESS PARAMETER FAILED");
76 PI
:= NEW INTEGER '(0);
81 ---------------------------------------------
85 TYPE TBL IS ARRAY (1..3) OF INTEGER;
86 TYPE PTRTBL IS ACCESS TBL;
89 PROCEDURE PROCB (PT : IN PTRTBL) IS
91 PROCEDURE PROCB1 (I : OUT INTEGER) IS
96 PROCEDURE PROCB2 (I : IN OUT INTEGER) IS
101 PROCEDURE PROCB3 (T : OUT TBL) IS
106 PROCEDURE PROCB4 (T : IN OUT TBL) IS
113 PROCB3 (PT.ALL); -- (1,2,3)
114 PROCB4 (PT.ALL); -- (1,2,2)
115 PROCB1 (PT(2)); -- (1,7,2)
116 PROCB2 (PT(1)); -- (2,7,2)
117 PT(3) := PT(3) + 7; -- (2,7,9)
118 IF (PT.ALL /= (2,7,9)) THEN
119 FAILED ("ASSIGNMENT TO COMPONENT OF ARRAY" &
120 " ACCESS PARAMETER FAILED");
126 PT := NEW TBL '(0,0,0);
131 ---------------------------------------------
141 TYPE PTRREC
IS ACCESS REC
;
144 PROCEDURE PROCC
(PR
: IN PTRREC
) IS
146 PROCEDURE PROCC1
(I
: OUT INTEGER) IS
151 PROCEDURE PROCC2
(I
: IN OUT INTEGER) IS
156 PROCEDURE PROCC3
(R
: OUT REC
) IS
161 PROCEDURE PROCC4
(R
: IN OUT REC
) IS
168 PROCC3
(PR
.ALL); -- (1,2,3)
169 PROCC4
(PR
.ALL); -- (1,2,2)
170 PROCC1
(PR
.I2
); -- (1,7,2)
171 PROCC2
(PR
.I1
); -- (2,7,2)
172 PR
.I3
:= PR
.I3
+ 7; -- (2,7,9)
173 IF (PR
.ALL /= (2,7,9)) THEN
174 FAILED
("ASSIGNMENT TO COMPONENT OF RECORD" &
175 " ACCESS PARAMETER FAILED");
181 PR
:= NEW REC
'(0,0,0);
186 ---------------------------------------------