comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison<dennison@telepath.com>
Subject: Re: new types
Date: Tue, 08 May 2001 13:36:19 GMT
Date: 2001-05-08T13:36:19+00:00	[thread overview]
Message-ID: <nDSJ6.5955$vg1.463397@www.newsranger.com> (raw)
In-Reply-To: 3AF76ADC.1E8E5771@mindspring.com

In article <3AF76ADC.1E8E5771@mindspring.com>, Larry Hazel says...
>
>Bob McChesney wrote:
>> 
>> but can you do:
>>     type BobType is new Set_Class.Set
>> where Set is:
>>     type Set access Set_Header
>> ?????
>> 
>> I've tried to do this and I get the error 'invalid prefix in selected
>> component "Set_Class" '
>> 
>> I don't know if it matters but Set_Class is generic.
>Set_Class.Set doesn't exist if Set_Class is generic.  A new type Set is created
>for each instantiation of Set_Class.

Right. In other words, you'll have to instantiate the generic first:

package My_Set is new Set_Class;

Then use the *instantiation* name in your type.

type Bobtype is new My_Set.Set;

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



  reply	other threads:[~2001-05-08 13:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-08  2:39 new types Bob McChesney
2001-05-08  3:41 ` Larry Hazel
2001-05-08 13:36   ` Ted Dennison [this message]
2001-05-08 15:29   ` 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