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,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,becfcd482f73209e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-08 10:11:31 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!212.74.64.35!colt.net!diablo.theplanet.net!news.theplanet.net!newspost.theplanet.net!not-for-mail From: "Bob McChesney" Newsgroups: comp.lang.ada Subject: Re: Trouble with renaming types Date: Tue, 8 May 2001 18:12:21 +0100 Message-ID: <9d99bp$oi4$1@newsg1.svr.pol.co.uk> References: <9d93ri$lhv$2@newsg3.svr.pol.co.uk> <9d949f$kto$1@newsg1.svr.pol.co.uk> <%oVJ6.129347$xN4.8316100@news1.sttls1.wa.home.com> NNTP-Posting-Host: modem-47.holmium.dialup.pol.co.uk X-Trace: newsg1.svr.pol.co.uk 989341881 25156 62.136.53.47 (8 May 2001 17:11:21 GMT) NNTP-Posting-Date: 8 May 2001 17:11:21 GMT X-Complaints-To: abuse@theplanet.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: newsfeed.google.com comp.lang.ada:7334 Date: 2001-05-08T17:11:21+00:00 List-Id: Hmm, maybe I'm doing it wrong then... When I use the 1st method (i.e. new type of WordSet.Set) what you said about inherited procedures doesn't seem to hold for me. eg, I've instantiated WordSet. So ... in WordSet I have: a type defined called Set a procedure Add(Set, Word) I've made type Dictionary a new WordSet.Set (which it allows no problem). BUT when I try and do: WordSet(Dictionary, Word) I get the compilation error: Expected private type "Set" .... found private type "Dictionary". Any ideas? Thanks Bob "Mark" wrote in message news:%oVJ6.129347$xN4.8316100@news1.sttls1.wa.home.com... > > "Bob McChesney" 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 > > >