comp.lang.ada
 help / color / mirror / Atom feed
From: Caffeine Junky <nospam@hotmail.com>
Subject: Re: A little help on Generics.
Date: Tue, 25 Jun 2002 07:25:27 GMT
Date: 2002-06-25T07:25:27+00:00	[thread overview]
Message-ID: <HVUR8.144628$R61.54443@rwcrnsc52.ops.asp.att.net> (raw)
In-Reply-To: PVQR8.142019$R61.52806@rwcrnsc52.ops.asp.att.net

On Mon, 24 Jun 2002 22:52:31 -0400, SteveD wrote:

> To create an instance of the package:
> 
>> generic
>>    Max : Positive;
>>    type Item is private;
>> package genstack is
> 
> Use:
>   package Int_Stack is new genstack(Max => 500, Item => Integer);
> 
> Not:
>   type Int_Stack is new genstack(Max => 500, Item => Integer);
> 
> Then you can use Int_Stack just a if it were a non-generic package.
> 
> You're close.  You are very very close.
> 
> SteveD
 

I got it to work, more or less. The package instantiated just fine. And
the output also revealed some errors in my code.(Very embarassing errors
at that.)

I'll go over the code again, correct it, and post it up for scrutiny.


Thanks. I really appreciate it.

And, thanks for being patient. Heh.


Staple



      reply	other threads:[~2002-06-25  7:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-24  6:15 A little help on Generics Caffeine Junky
2002-06-24  7:34 ` Dale Stanbrough
2002-06-24 10:49 ` Jeffrey Creem
2002-06-24 18:50   ` Caffeine Junky
2002-06-24 20:21     ` Jeffrey Creem
2002-06-24 22:29       ` Caffeine Junky
2002-06-25  2:52 ` SteveD
2002-06-25  7:25   ` Caffeine Junky [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