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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a7e924605448fc4e X-Google-Attributes: gid103376,public From: Ehud Lamm Subject: Re: How to make a generic controlled type? Date: 1999/09/24 Message-ID: #1/1 X-Deja-AN: 529210245 References: <7sg9cg$mvm$1@nyheter.chalmers.se> Content-Type: TEXT/PLAIN; charset=US-ASCII Organization: The hebrew University of Jerusalem Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-09-24T00:00:00+00:00 List-Id: The following seems to compile fine on my system. What problem do you have exactly? with Ada.Finalization; generic type Element_Type is private; package Bug_List is type List is new Ada.Finalization.Limited_Controlled with private; -- Insert E at the current location. procedure Insert (L: in out List; E: in Element_Type); private type Node; type Link is access Node; type Node is record V:Element_Type; N:Link; end record; type List is new Ada.Finalization.Limited_Controlled with record H:Link; end record; procedure Initialize(L:in out List); procedure Finalize (L:in out List); end; By the way, just a day ago I submitted an example of a "simple controlled list" to AdaPower (to accompany my example of a simple polymorphic list). I don't think it is there yet but I guess it should be soon. You may want to take it and start from there. Ehud Lamm mslamm@mscc.huji.ac.il http://purl.oclc.org/NET/ehudlamm <== My home on the web Check it out and subscribe to the E-List- for interesting essays and more!