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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6b3cb4f0bf4a783e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-25 17:58:55 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!rcn!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3B37DC6C.896C1199@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: C++ friend References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 26 Jun 2001 00:51:04 GMT NNTP-Posting-Host: 206.133.140.76 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 993516664 206.133.140.76 (Mon, 25 Jun 2001 17:51:04 PDT) NNTP-Posting-Date: Mon, 25 Jun 2001 17:51:04 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Mon, 25 Jun 2001 17:48:50 PDT (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:9104 Date: 2001-06-26T00:51:04+00:00 List-Id: Richard Johnson wrote: > > Howdy, could someone point me to a good author or tell me if there is an > equivilent to a C++ friend in Ada95? > > I appologize if this subject has already been hashed to death, this is my > first time here :) You won't find many friends of C++ here. You can find out if things have been hashed to death by searching in the comp.lang.ada archives at groups.google.com. In Ada, encapsulation and information hiding is provided by packages. Visibility to a package's contents varies by where in the package something is declared: Items declared in the visible part of a package specification can be visible anywhere. This is similar to C++'s "public". Items declared in the package body are only visible within the package. This is similar to C++'s "private". Items declared in the private part of a package specification are visible within the package, within the private part and body of child packages, and within all of private child packages. This, I think, is similar to C++'s "friend". -- Jeff Carter "Son of a window-dresser." Monty Python & the Holy Grail