comp.lang.ada
 help / color / mirror / Atom feed
From: koehnema@enuxsa.eas.asu.edu (Harry Koehnemann)
Subject: Type extension questions
Date: Wed, 22 Mar 1995 00:25:26 GMT
Date: 1995-03-22T00:25:26+00:00	[thread overview]
Message-ID: <D5tFuE.1vx@ennews.eas.asu.edu> (raw)

I have a couple questions on Ada95 tagged types.  These appear to be
easy questions, but I can't seem to locate an answer for either.
LRM references would also be appreciated with an answer.

1) Is it possible to derive a type such that the parent operations are not
   available to the user of the new type?  This question is equivalent to
   the ability to do private inheritance ala C++ - class B: private A { ...};
   I would assume the answer is yes, but haven't yet figured out how.

2) Can a derived type declare a component with the same name as a parent
   component?  At the risk of being lectured on GNAT's incompleteness :),
   GNAT allows a new same-name components if the parent type is private and
   the child type is public, but does gives an error if the child and parent
   are both public or private.  I assume the answer is one or the other,
   not "if one is private and one is public...".  Other OO languages allow
   this in their inheritance and I assume Ada95 does as well.

Thanks.

--
Harry Koehnemann			Arizona State University
hek@asu.edu				Computer Science Department



             reply	other threads:[~1995-03-22  0:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-22  0:25 Harry Koehnemann [this message]
1995-03-22 12:01 ` Type extension questions Robb Nebbe
1995-03-23 22:05   ` Harry Koehnemann
1995-03-25  6:59     ` Cyrille Comar
1995-03-25  7:13     ` Cyrille Comar
1995-03-27  0:00       ` Norman H. Cohen
1995-03-30  0:00         ` Cyrille Comar
1995-03-27 17:29       ` Harry Koehnemann
1995-03-27 20:26         ` Robert I. Eachus
1995-03-29  0:00           ` Harry Koehnemann
1995-03-27 20:37         ` Kennel
1995-03-23 22:03 ` Tucker Taft
replies disabled

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