comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison<dennison@telepath.com>
Subject: Re: How do I inherit generic subprograms defined for a parent type?
Date: Mon, 13 Aug 2001 21:22:21 GMT
Date: 2001-08-13T21:22:21+00:00	[thread overview]
Message-ID: <hyXd7.78$2u.23429@www.newsranger.com> (raw)
In-Reply-To: vc566britpb.fsf@grinch.htc.honeywell.com

In article <vc566britpb.fsf@grinch.htc.honeywell.com>, 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



      reply	other threads:[~2001-08-13 21:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-13 20:35 How do I inherit generic subprograms defined for a parent type? Steve Vestal
2001-08-13 21:22 ` Ted Dennison [this message]
replies disabled

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