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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5524603d74cda791 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news2.volia.net!news.musoftware.de!news.karotte.org!uucp.gnuu.de!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Tue, 16 May 2006 21:58:32 +0200 From: Georg Bauhaus Organization: elsewhere User-Agent: Thunderbird 1.5 (Macintosh/20051201) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Inter-object pointer problem References: <1147806613.377038.169250@j33g2000cwa.googlegroups.com> In-Reply-To: <1147806613.377038.169250@j33g2000cwa.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <446a2ee4$0$4514$9b4e6d93@newsread2.arcor-online.net> NNTP-Posting-Date: 16 May 2006 21:58:28 MEST NNTP-Posting-Host: b32b9fef.newsread2.arcor-online.net X-Trace: DXC=kD99NMZLWD0g0XoR1BOW]1GVLc9A2=0F65HQV8i6;?PH`Q\XMR8 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:4277 Date: 2006-05-16T21:58:28+02:00 List-Id: Alex Catlin wrote: > Say I have Packages A and B, implementing data structure A and B > respectively. I want to create a new B everytime I call a certain > procedure, and insert a pointer to that data structure Do you mean, a pointer to a package instance? > The problem is that generic package A is expecting to be instantiated > with an access type, but the Ptr_B doesnt exist until I have called > procedure X. Is there a reason that you are instantiating the package inside the procedure? > If this were C I would instantiate A_Structure as a static > type In this case your idea and the use of a generic _package_ do not correspond so well, I'd say. But I might have misunderstood your description of problem and solution. Could you clarify a bit, e.g. "structure" is a rather ambigous term, used in C, ML, and elsewhere, meaning different things. But it's not clear (to me at least) what it is supposed to mean here. Do you have a slightly more specified example, one that could be compiled, if not successful?