comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: C++ friend
Date: Tue, 26 Jun 2001 00:51:04 GMT
Date: 2001-06-26T00:51:04+00:00	[thread overview]
Message-ID: <3B37DC6C.896C1199@acm.org> (raw)
In-Reply-To: fAQZ6.30950$Mf5.7551625@news3.rdc1.on.home.com

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



  reply	other threads:[~2001-06-26  0:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-26  0:21 C++ friend Richard Johnson
2001-06-26  0:51 ` Jeffrey Carter [this message]
2001-06-26  2:40 ` James Rogers
2001-07-03 15:12 ` Georg Bauhaus
replies disabled

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