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,68c80d9ad156e257,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-21 16:25:26 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!dearn!blekul11!ccsdec1.ufsia.ac.be!reks.uia.ac.be!idefix.CS.kuleuven.ac.be! Belgium.EU.net!EU.net!howland.reston.ans.net!gatech!newsfeed.pitt.edu!uunet!inews.intel.com!itnews.intel.com!chnews!ennews!enuxsa.eas.asu.edu!koehnema From: koehnema@enuxsa.eas.asu.edu (Harry Koehnemann) Subject: Type extension questions Message-ID: Nntp-Posting-Host: enuxsa.eas.asu.edu Sender: news@ennews.eas.asu.edu (USENET News System) Organization: Arizona State University Date: Wed, 22 Mar 1995 00:25:26 GMT Date: 1995-03-22T00:25:26+00:00 List-Id: 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