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 VALUES BELONGING TO EACH CLASS OF TYPE CAN BE WRITTEN AS
26 -- THE OPERANDS OF QUALIFIED EXPRESSIONS.
27 -- THIS TEST IS FOR PRIVATE AND LIMITED PRIVATE TYPES.
31 WITH REPORT
; USE REPORT
;
36 TEST
( "C47002D", "CHECK THAT VALUES HAVING PRIVATE AND LIMITED " &
37 "PRIVATE TYPES CAN BE WRITTEN AS THE OPERANDS " &
38 "OF QUALIFIED EXPRESSIONS" );
40 DECLARE -- PRIVATE TYPES.
42 TYPE RESULTS
IS (P1
, P2
, P3
, P4
, P5
);
46 TYPE PCHAR
IS PRIVATE;
48 TYPE PREC
(D
: INTEGER) IS PRIVATE;
51 FUNCTION F
RETURN PINT
;
52 FUNCTION F
RETURN PCHAR
;
53 FUNCTION F
RETURN PARR
;
54 FUNCTION F
RETURN PREC
;
55 FUNCTION F
RETURN PACC
;
58 TYPE PINT
IS NEW INTEGER;
59 TYPE PCHAR
IS NEW CHARACTER;
60 TYPE PARR
IS ARRAY (1 .. 2) OF NATURAL;
62 TYPE PREC
(D
: INTEGER) IS
67 TYPE PACC
IS ACCESS PREC
;
72 FUNCTION F
RETURN PINT
IS
77 FUNCTION F
RETURN PCHAR
IS
82 FUNCTION F
RETURN PARR
IS
84 RETURN PARR
'(OTHERS => 3);
87 FUNCTION F RETURN PREC IS
92 FUNCTION F
RETURN PACC
IS
99 PACKAGE PKG2 IS END PKG2;
104 FUNCTION CHECK (P : PINT) RETURN RESULTS IS
109 FUNCTION CHECK (P : PCHAR) RETURN RESULTS IS
114 FUNCTION CHECK (P : PARR) RETURN RESULTS IS
119 FUNCTION CHECK (P : PREC) RETURN RESULTS IS
124 FUNCTION CHECK (P : PACC) RETURN RESULTS IS
130 IF CHECK (PINT'(F
)) /= P1
THEN
131 FAILED
( "INCORRECT RESULTS FOR TYPE PINT" );
134 IF CHECK
(PCHAR
'(F)) /= P2 THEN
135 FAILED ( "INCORRECT RESULTS FOR TYPE PCHAR" );
138 IF CHECK (PARR'(F
)) /= P3
THEN
139 FAILED
( "INCORRECT RESULTS FOR TYPE PARR" );
142 IF CHECK
(PREC
'(F)) /= P4 THEN
143 FAILED ( "INCORRECT RESULTS FOR TYPE PREC" );
146 IF CHECK (PACC'(F
)) /= P5
THEN
147 FAILED
( "INCORRECT RESULTS FOR TYPE PACC" );
156 DECLARE -- LIMITED PRIVATE TYPES.
158 TYPE RESULTS
IS (LP1
, LP2
, LP3
, LP4
, LP5
);
161 TYPE LPINT
IS LIMITED PRIVATE;
162 TYPE LPCHAR
IS LIMITED PRIVATE;
163 TYPE LPARR
IS LIMITED PRIVATE;
164 TYPE LPREC
(D
: INTEGER) IS LIMITED PRIVATE;
165 TYPE LPACC
IS LIMITED PRIVATE;
167 FUNCTION F
RETURN LPINT
;
168 FUNCTION F
RETURN LPCHAR
;
169 FUNCTION F
RETURN LPARR
;
170 FUNCTION F
RETURN LPREC
;
171 FUNCTION F
RETURN LPACC
;
174 TYPE LPINT
IS NEW INTEGER;
175 TYPE LPCHAR
IS NEW CHARACTER;
176 TYPE LPARR
IS ARRAY (1 .. 2) OF NATURAL;
178 TYPE LPREC
(D
: INTEGER) IS
183 TYPE LPACC
IS ACCESS LPREC
;
188 FUNCTION F
RETURN LPINT
IS
193 FUNCTION F
RETURN LPCHAR
IS
198 FUNCTION F
RETURN LPARR
IS
200 RETURN LPARR
'(OTHERS => 3);
203 FUNCTION F RETURN LPREC IS
205 RETURN LPREC'(D
=> 4);
208 FUNCTION F
RETURN LPACC
IS
210 RETURN NEW LPREC
'(F);
215 PACKAGE PKG2 IS END PKG2;
220 FUNCTION CHECK (LP : LPINT) RETURN RESULTS IS
225 FUNCTION CHECK (LP : LPCHAR) RETURN RESULTS IS
230 FUNCTION CHECK (LP : LPARR) RETURN RESULTS IS
235 FUNCTION CHECK (LP : LPREC) RETURN RESULTS IS
240 FUNCTION CHECK (LP : LPACC) RETURN RESULTS IS
246 IF CHECK (LPINT'(F
)) /= LP1
THEN
247 FAILED
( "INCORRECT RESULTS FOR TYPE LPINT" );
250 IF CHECK
(LPCHAR
'(F)) /= LP2 THEN
251 FAILED ( "INCORRECT RESULTS FOR TYPE LPCHAR" );
254 IF CHECK (LPARR'(F
)) /= LP3
THEN
255 FAILED
( "INCORRECT RESULTS FOR TYPE LPARR" );
258 IF CHECK
(LPREC
'(F)) /= LP4 THEN
259 FAILED ( "INCORRECT RESULTS FOR TYPE LPREC" );
262 IF CHECK (LPACC'(F
)) /= LP5
THEN
263 FAILED
( "INCORRECT RESULTS FOR TYPE LPACC" );