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,d4e2f238dc61c890 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!out04a.usenetserver.com!news.usenetserver.com!in01.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!uns-out.usenetserver.com!news.usenetserver.com!pc03.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Protected types and visibility of their internals References: From: Stephen Leake Date: Wed, 09 Jul 2008 18:19:04 -0400 Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:Ii6kCCGoMxU36pXAQo84l/dzCRU= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 37aab4875333825124ec001711 Xref: g2news1.google.com comp.lang.ada:1060 Date: 2008-07-09T18:19:04-04:00 List-Id: Maciej Sobczak writes: > Consider a protected type in some package: > > package P is > protected type PT is > procedure Foo; > private > X : Some_Type; > end PT; > end P; > > The protected type has a component X of Some_Type, which is entirely > the private business of the protected type. > > Where this type should be declared? In a sibling private package: private package P.stuff is type Some_Type is ...; end P.Stuff; private with P.stuff; package P is protected type PT is procedure Foo; private X : P.Stuff.Some_Type; end PT; end P; Hmm. Maybe that's not right, since P.Stuff is used in the private part of a public type, not strictly in the private part of P. But it _should_ be ok! -- -- Stephe