From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!mervax.UUCP!gicca From: gicca@mervax.UUCP (Greg) Newsgroups: comp.lang.ada Subject: What's wrong with this picture? Message-ID: <8810211257.AA07315@savax.Sanders.COM> Date: 21 Oct 88 12:57:47 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: What's wrong with this picture. The below package Data does not compile. It looks fine to me, but there must be something I'm missing. Does anyone see what I've overlooked. The with'd source, Data package, error listing and generic are all listed below. >From my understanding, the LRM says the code is correct. LRM section 12.3.2(3) last statement, says: "(If, on the other hand, the formal type has no discriminants, the actual type is allowed to have discriminants.)" Thanks in advance for any help, Greg Gicca Sanders Associates Nashua, N.H. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --Dynamic_String_Definition_.Ada --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: package Dynamic_String_Definition is type Dynamic_String(Maximum_Length : Positive) is record Value : String(1..Maximum_Length); Length : Natural := 0; end record; end Dynamic_String_Definition; --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --Single_List_Utility_.Ada --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: generic type Element_Type is private; package Single_List_Utility is type List_Type is private; ......... end Single_List_Utility; --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --Data.Ada --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: with Single_List_Utility; with Dynamic_String_Definition; use Dynamic_String_Definition; package Data is new Single_List_Utility(Element_Type => Dynamic_String(Maximum_Length => 132) ); --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --Compiler.Errors --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Data 19-Oct-1988 13:31:50 VAX Ada V1.4-33 Page 1 01 19-Oct-1988 13:22:31 DATA_.ADA;1 (1) 1 with Single_List_Utility; 2 with Dynamic_String_Definition; 3 use Dynamic_String_Definition; 4 5 package Data is new Single_List_Utility(Element_Type => 6 Dynamic_String(Maximum_Length => 132) ); ...........1.............2...............3 (3) A named association is not a form of expression [LRM 4.4(2)] (2) A type conversion is not a form of name [LRM 4.1(2)] (1) For Dynamic_String the meaning is record type Dynamic_String in Dynamic_String_Definition at line 3 (2) Error occurs in actual corresponding to generic formal type Element_Type in Single_List_Utility at line 2 ------------------------------------------------------------------------------