1-- CC1107B.ADA 2 3-- Grant of Unlimited Rights 4-- 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 14-- to do so. 15-- 16-- DISCLAIMER 17-- 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. 24--* 25-- OBJECTIVE: 26-- CHECK THAT A DEFAULT EXPRESSION MAY REFER TO AN EARLIER FORMAL 27-- PARAMETER OF THE SAME GENERIC FORMAL PART. 28 29-- HISTORY: 30-- BCB 08/03/88 CREATED ORIGINAL TEST. 31 32WITH REPORT; USE REPORT; 33 34PROCEDURE CC1107B IS 35 36 J, I : INTEGER; 37 38 X : INTEGER := IDENT_INT(0); 39 40 VAL : INTEGER := IDENT_INT(10); 41 42 GENERIC 43 X : INTEGER := IDENT_INT(5); 44 Y : INTEGER := X; 45 FUNCTION F RETURN INTEGER; 46 47 GENERIC 48 X : INTEGER; 49 Y : INTEGER := X; 50 FUNCTION G RETURN INTEGER; 51 52 FUNCTION F RETURN INTEGER IS 53 BEGIN 54 IF NOT EQUAL(X,Y) THEN 55 FAILED ("WRONG VALUE FROM EARLIER FORMAL PARAMETER - 1"); 56 END IF; 57 58 RETURN 0; 59 END F; 60 61 FUNCTION G RETURN INTEGER IS 62 BEGIN 63 IF NOT EQUAL(X,Y) THEN 64 FAILED ("WRONG VALUE FROM EARLIER FORMAL PARAMETER - 2"); 65 END IF; 66 67 RETURN 0; 68 END G; 69 70 FUNCTION NEW_F IS NEW F; 71 72 FUNCTION NEW_G IS NEW G(VAL); 73 74BEGIN 75 TEST ("CC1107B", "CHECK THAT A DEFAULT EXPRESSION MAY REFER " & 76 "TO AN EARLIER FORMAL PARAMETER OF THE SAME " & 77 "GENERIC FORMAL PART"); 78 79 J := NEW_F; 80 81 I := NEW_G; 82 83 RESULT; 84END CC1107B; 85