comp.lang.ada
 help / color / mirror / Atom feed
From: "Mark" <up.yerz@nospam.com>
Subject: Re: Trouble with renaming types
Date: Tue, 08 May 2001 16:45:47 GMT
Date: 2001-05-08T16:45:47+00:00	[thread overview]
Message-ID: <%oVJ6.129347$xN4.8316100@news1.sttls1.wa.home.com> (raw)
In-Reply-To: 9d949f$kto$1@newsg1.svr.pol.co.uk


"Bob McChesney" <bob@teambob.freeserve.co.uk> wrote in message
news:9d949f$kto$1@newsg1.svr.pol.co.uk...
> Oh, forgot to mention, I'm not using:
>
> 'type Dictionary is new WordSet.Set'
>
> because when I do that all the functions of WordSet cannot operate on type
> Dictionary.

Yes and no... subprograms defined immediately within Wordset, if they
operate on type Set, are "primitive operations" of Set and will be inherited
(think of that as "duplicated") for type Dictionary.

But subprograms defined elsewhere that operate operate on Set are not part
of type Set, so they can't be inherited by Dictionary.

>
> What I need is to be able to give type WordSet.Set a new name, but still
> allow all oof the WordSet functions/procedures to be able to work on it.
>

To "alias" a type with an interchangeable name, say this:

    subtype Dictionary is Wordset.Set;

(note, no "new" in there... :-)

Have fun,
-- mark






  reply	other threads:[~2001-05-08 16:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-08 15:37 Trouble with renaming types Bob McChesney
2001-05-08 15:45 ` Bob McChesney
2001-05-08 16:45   ` Mark [this message]
2001-05-08 17:12     ` Bob McChesney
2001-05-09 13:18 ` Stephen Leake
2001-05-09 15:22   ` Bob McChesney
  -- strict thread matches above, loose matches on Subject: below --
2001-05-09  4:59 Christoph Grein
2001-05-09 15:15 ` Bob McChesney
replies disabled

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