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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2914089b822a81 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-13 14:22:36 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: Subject: Re: How do I inherit generic subprograms defined for a parent type? Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Mon, 13 Aug 2001 17:22:21 EDT Organization: http://www.newsranger.com Date: Mon, 13 Aug 2001 21:22:21 GMT Xref: archiver1.google.com comp.lang.ada:11871 Date: 2001-08-13T21:22:21+00:00 List-Id: In article , Steve Vestal says... >I would like to declare another type as a derivation of that (parent) type. >"Primitive subprograms" are inherited by a derived type from a parent type, >but I can't figure out how to get generic subprograms defined for a parent >type to be inherited as well. > type access_expression is private; -- This will be used as a parent type. .. >private > type expression is record > Datum: integer; > end record; > type access_expression is access expression; >end Expression; One thing that strikes me right of the bat is that your "parent type" is not tagged. If its not tagged, you can still derive from it, but you won't inherit any operations except the built-in ones (and you won't get most of those on the outside if you make it "private"). You also won't be able to extend the type in a derived type by adding new fields and new primitive operations. If that's what you want, fine, but that's not the impression I got from reading your post. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com