comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Barnes vs. Dewar
Date: 1999/08/27
Date: 1999-08-27T00:00:00+00:00	[thread overview]
Message-ID: <wcc3dx5gp7v.fsf@world.std.com> (raw)
In-Reply-To: 37C66E08.16DB@dera.gov.uk

Anton Gibbs <agibbs@dera.gov.uk> writes:

> Well, when I tried a similar thing with the GNAT compiler it threw it
> out complaining that:
> 
>    "Initialize" is not a visible entity of "User_View"
> 
> After the usual agony with the LRM, I eventually had to agree. I do not
> think that the child package `Tracked_Things.User_View' is entitled to
> see `Initialize' in the private part of its parent and so it cannot be
> inherited. If you move `Initialize' to the visible part it all works
> fine.
> 
> So who is right Barnes or Dewar ?

You'll have to post the exact code you compiled, along with the error
message, to know whether Barnes or gnat or both are correct.  "A similar
thing" isn't specific enough.

By the way, Dewar isn't *exactly* synonymous with gnat.  ;-) ;-)

> More to the point, what is the correct way to achieve the desired level
> of visibility (ie. `Tracked_Things.User_View.Initialize' visible
> but `Tracked_Things.Initialize' not) ?

You may declare Initialize in the visible part of
Tracked_Things.User_View, and it will override the privately-inherited
Initialize, and it will also be visible outside this package.
Is that what you want?

- Bob
-- 
Change robert to bob to get my real email address.  Sorry.




  reply	other threads:[~1999-08-27  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-27  0:00 Barnes vs. Dewar Anton Gibbs
1999-08-27  0:00 ` Robert A Duff [this message]
1999-08-27  0:00   ` Matthew Heaney
1999-08-30  0:00     ` Robert A Duff
1999-08-27  0:00 ` Matthew Heaney
1999-08-29  0:00 ` Robert Dewar
replies disabled

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