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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8e00db9621be96e0 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!z1g2000yqn.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Package Hierarchy and Private functions Date: Wed, 18 Mar 2009 05:42:11 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 137.138.182.236 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1237380131 787 127.0.0.1 (18 Mar 2009 12:42:11 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 18 Mar 2009 12:42:11 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z1g2000yqn.googlegroups.com; posting-host=137.138.182.236; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5141 Date: 2009-03-18T05:42:11-07:00 List-Id: On 18 Mar, 13:22, "RasikaSriniva...@gmail.com" wrote: > Supposing we have 2 packages like : > > package P is > =A0 type Pvt_T is private ; > private > =A0 type Pvt_T is ... ; > =A0 procedure Pvt_Proc(p : in out Pvt_T) ; > end P ; > > --------------------- > > package P.C is > .... > end P.C ; > > ------------------ > > Is there a way for P.C to access Pvt_Proc Yes. Just do it. > I guess this may be analogous to protected in C++? Ada's private *is* analogous to protected in C++. > Does P.C has a special relationship to P? Yes, it can see its private (which means protected) parts. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada