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 AN INTEGER FORMAL TYPE DENOTES ITS ACTUAL PARAMETER, AND
26 -- OPERATIONS OF THE FORMAL TYPE ARE IDENTIFIED WITH CORRESPONDING
27 -- OPERATIONS OF THE ACTUAL TYPE.
31 WITH REPORT
; USE REPORT
;
42 TEST
("CC3221A", "CHECK THAT AN INTEGER FORMAL TYPE DENOTES ITS " &
43 "ACTUAL PARAMETER, AND OPERATIONS OF THE " &
44 "FORMAL TYPE ARE IDENTIFIED WITH CORRESPONDING " &
45 "OPERATIONS OF THE ACTUAL TYPE");
48 TYPE FIXED
IS DELTA 0.125 RANGE 0.0 .. 10.0;
50 OBJ_INT
: INTEGER := 1;
51 OBJ_FLO
: FLOAT := 1.0;
52 OBJ_FIX
: FIXED
:= 1.0;
54 PACKAGE P1
IS NEW P
(INTEGER);
57 TYPE NEW_T
IS NEW SUB_T
;
61 IF PAC_VAR /= OBJ_INT THEN
62 FAILED ("INCORRECT RESULTS - 1");
64 OBJ_INT := PAC_VAR + OBJ_INT;
65 IF OBJ_INT <= PAC_VAR THEN
66 FAILED ("INCORRECT RESULTS - 2");
68 PAC_VAR := PAC_VAR * OBJ_INT;
69 IF PAC_VAR NOT IN INTEGER THEN
70 FAILED ("INCORRECT RESULTS - 3");
72 IF OBJ_INT NOT IN SUB_T THEN
73 FAILED ("INCORRECT RESULTS - 4");
75 IF INTEGER'POS(2) /= SUB_T'POS(2) THEN
76 FAILED ("INCORRECT RESULTS - 5");
79 OBJ_FIX := PAC_VAR * OBJ_FIX;
80 IF OBJ_FIX /= 1.0 THEN
81 FAILED ("INCORRECT RESULTS - 6");
84 OBJ_FIX := OBJ_FIX / OBJ_INT;
85 IF OBJ_FIX /= 1.0 THEN
86 FAILED ("INCORRECT RESULTS - 7");
88 OBJ_INT := OBJ_INT ** PAC_VAR;
90 FAILED ("INCORRECT RESULTS - 8");
92 OBJ_FLO := OBJ_FLO ** PAC_VAR;
93 IF OBJ_FLO /= 1.0 THEN
94 FAILED ("INCORRECT RESULTS - 9");
97 OBJ_NEWT := OBJ_NEWT - 1;
98 IF OBJ_NEWT NOT IN NEW_T THEN
99 FAILED ("INCORRECT RESULTS - 10");
101 IF NEW_T'SUCC(2) /= 3 THEN
102 FAILED ("INCORRECT RESULTS - 11");