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 ASSIGNMENTS TO FORMAL PARAMETERS OF UNCONSTRAINED
26 -- RECORD, PRIVATE, AND LIMITED PRIVATE TYPES WITH DEFAULT
27 -- CONSTRAINTS DO NOT RAISE CONSTRAINT_ERROR IF THE ACTUAL PARAMETER
28 -- IS UNCONSTRAINED, EVEN IF THE CONSTRAINT VALUES OF THE OBJECT
29 -- BEING ASSIGNED ARE DIFFERENT THAN THOSE OF THE ACTUAL PARAMETER.
32 -- (A) UNCONSTRAINED ACTUAL PARAMETERS OF RECORD TYPE.
33 -- (B) UNCONSTRAINED ACTUAL PARAMETERS OF PRIVATE TYPE.
34 -- (C) UNCONSTRAINED ACTUAL PARAMETERS OF LIMITED PRIVATE TYPE.
47 TEST
("C64106D", "CHECK ASSIGNMENTS TO FORMAL PARAMETERS OF " &
48 "UNCONSTRAINED TYPES WITH UNCONSTRAINED " &
51 --------------------------------------------------
57 SUBTYPE INTRANGE
IS INTEGER RANGE 0..31;
59 TYPE RECTYPE
(CONSTRAINT
: INTRANGE
:= 15) IS
62 STRFLD
: STRING(1..CONSTRAINT
);
65 PROCEDURE P
(REC1
: IN RECTYPE
; REC2
: IN OUT RECTYPE
;
69 REC91
, REC92
, REC93
: PKG
.RECTYPE
:=
70 (IDENT_INT
(5), 5, IDENT_STR
("12345"));
71 REC_OOPS
: PKG
.RECTYPE
;
75 PROCEDURE P
(REC1
: IN RECTYPE
; REC2
: IN OUT RECTYPE
;
76 REC3
: OUT RECTYPE
) IS
78 PROCEDURE P1
(REC11
: IN RECTYPE
;
79 REC12
: IN OUT RECTYPE
;
80 REC13
: OUT RECTYPE
) IS
83 IF NOT REC11
'CONSTRAINED THEN
84 FAILED
("REC11 IS NOT CONSTRAINED - A.1");
86 IF REC11
.CONSTRAINT
/= IDENT_INT
(9) THEN
87 FAILED
("REC11 CONSTRAINT IS NOT 9 " &
91 BEGIN -- ASSIGNMENT TO IN OUT PARAMETER
95 FAILED
("EXCEPTION RAISED - A.1");
98 BEGIN -- ASSIGNMENT TO OUT PARAMETER
102 FAILED
("EXCEPTION RAISED - A.2");
107 P1
(REC1
, REC2
, REC3
);
112 REC91
:= (9, 9, "123456789");
116 REC_OOPS
:= (4, 4, "OOPS");
124 PKG
.P
(REC91
, REC92
, REC93
);
125 IF (REC92
/= REC_OOPS
) OR (REC93
/= REC_OOPS
) THEN
126 FAILED
("RESULTANT VALUE OF REC92 OR REC93 INCORRECT");
131 --------------------------------------------------
137 SUBTYPE INTRANGE
IS INTEGER RANGE 0..31;
139 TYPE RECTYPE
(CONSTRAINT
: INTRANGE
:= 15) IS PRIVATE;
141 PROCEDURE P
(REC1
: IN RECTYPE
; REC2
: IN OUT RECTYPE
;
146 TYPE RECTYPE
(CONSTRAINT
: INTRANGE
:= 15) IS
149 STRFLD
: STRING(1..CONSTRAINT
);
153 REC91
, REC92
, REC93
: PKG
.RECTYPE
;
154 REC_OOPS
: PKG
.RECTYPE
;
158 PROCEDURE P
(REC1
: IN RECTYPE
; REC2
: IN OUT RECTYPE
;
159 REC3
: OUT RECTYPE
) IS
161 PROCEDURE P1
(REC11
: IN RECTYPE
;
162 REC12
: IN OUT RECTYPE
;
163 REC13
: OUT RECTYPE
) IS
166 IF REC3
'CONSTRAINED THEN
167 FAILED
("REC3 IS CONSTRAINED - B.1");
170 BEGIN -- ASSIGNMENT TO IN OUT PARAMETER
174 FAILED
("EXCEPTION RAISED - B.1");
177 BEGIN -- ASSIGNMENT TO OUT PARAMETER
181 FAILED
("EXCEPTION RAISED - B.2");
186 P1
(REC1
, REC2
, REC3
);
191 REC91
:= (9, 9, "123456789");
195 REC_OOPS
:= (4, 4, "OOPS");
201 PKG
.P
(REC91
, REC92
, REC93
);
205 --------------------------------------------------
211 SUBTYPE INTRANGE
IS INTEGER RANGE 0..31;
213 TYPE RECTYPE
(CONSTRAINT
: INTRANGE
:= 15) IS
216 PROCEDURE P
(REC1
: IN RECTYPE
; REC2
: IN OUT RECTYPE
;
221 TYPE RECTYPE
(CONSTRAINT
: INTRANGE
:= 15) IS
224 STRFLD
: STRING(1..CONSTRAINT
);
228 REC91
, REC92
, REC93
: PKG
.RECTYPE
;
229 REC_OOPS
: PKG
.RECTYPE
;
233 PROCEDURE P
(REC1
: IN RECTYPE
; REC2
: IN OUT RECTYPE
;
234 REC3
: OUT RECTYPE
) IS
236 PROCEDURE P1
(REC11
: IN RECTYPE
;
237 REC12
: IN OUT RECTYPE
;
238 REC13
: OUT RECTYPE
) IS
241 BEGIN -- ASSIGNMENT TO IN OUT PARAMETER
245 FAILED
("EXCEPTION RAISED - C.1");
248 BEGIN -- ASSIGNMENT TO OUT PARAMETER
252 FAILED
("EXCEPTION RAISED - C.2");
257 P1
(REC1
, REC2
, REC3
);
262 REC91
:= (9, 9, "123456789");
266 REC_OOPS
:= (4, 4, "OOPS");
272 PKG
.P
(REC91
, REC92
, REC93
);
276 --------------------------------------------------