comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: Inter-object pointer problem
Date: Tue, 16 May 2006 20:09:34 GMT
Date: 2006-05-16T20:09:34+00:00	[thread overview]
Message-ID: <2kqag.975795$xm3.614021@attbi_s21> (raw)
In-Reply-To: <1147806613.377038.169250@j33g2000cwa.googlegroups.com>

Alex Catlin wrote:
> 
> 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. If this were C I would instantiate A_Structure as a static
> type during procedure X so it didn't keep making new A's every call,
> but I dont think I can do that in ADA. Is there a fix based on some
> concept i'm completely missing or am I going to have to completely
> change the organisation of the program?

This is so far from being correct Ada that it's impossible to tell what 
you're trying to do, but I'd suggest you pull the instantiation of B_Pkg 
out of the procedure.

If you can provide a better example, with information such as the 
specifications of the packages and the definition of B_Pointer_Type, we 
can probably help you better. It's likely you don't need access types or 
values at all outside the packages; pointers are needed far less often 
in Ada than in C (compiler writers excepted).

Finally, "Ada" is a woman's name, not the American Dental Association 
(or other acronym). People on c.l.a get more or less upset with others 
who don't capitalize it correctly.

-- 
Jeff Carter
"If you don't get the President of the United States on that
phone, ... you're going to have to answer to the Coca-Cola
Company."
Dr. Strangelove
32



  parent reply	other threads:[~2006-05-16 20:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1147806613.377038.169250@j33g2000cwa.googlegroups.com>
2006-05-16 19:58 ` Inter-object pointer problem Georg Bauhaus
2006-05-16 20:09 ` Jeffrey R. Carter [this message]
     [not found]   ` <1147816421.575165.66310@j33g2000cwa.googlegroups.com>
2006-05-17  2:03     ` Jeffrey R. Carter
2006-05-16 20:27 ` Martin Dowie
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox