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,16b1ef91d331648c X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: Barnes vs. Dewar Date: 1999/08/27 Message-ID: #1/1 X-Deja-AN: 517876769 Sender: bobduff@world.std.com (Robert A Duff) References: <37C66E08.16DB@dera.gov.uk> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1999-08-27T00:00:00+00:00 List-Id: Anton Gibbs 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.