comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: coding problems, please help.
Date: Sat, 13 Dec 2003 18:19:55 +0100
Date: 2003-12-13T18:19:55+01:00	[thread overview]
Message-ID: <brfhc6$2orij$1@ID-77047.news.uni-berlin.de> (raw)
In-Reply-To: fc116fae.0312130713.20068038@posting.google.com

Mr. J. wrote:

> Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> wrote in message
> news:<fh2btv8t6kopeec1mqgub87fr600s54qnu@4ax.com>...
>> On Mon, 8 Dec 2003 23:31:32 +0200, "Ratson Janiv" <janiv@013.net.il>
>> wrote:
>> 
>> >I found something ...
>> >Still having a problem ...
>> >procedure Q2 is
>> >
>> >    package My_Base_Queue is new Jr.Queue(T=>Integer);
>> >
>> >    package My_Queue_Max is new My_Base_Queue(">"=>">");
>> 
>> You are trying to instantiate a non-generic package (My_Base_Queue).
> 
> I guess so, but Jr.Queue is a generic package, so how do I define the
> My_Best_Queue as a generic package ?

It depends on what you want. I can only guess that you are probably longing
for a sort of generic specialization:

1. A generic child of Jr.Queue

generic
   with function ">" (L, R : T) return Boolean is <>;
package Jr.Queue.Ordered is
   ...

2. A generic package parametrized by an instance of Jr.Queue

generic
   type T is private;
   with function ">" (L, R : T) return Boolean is <>;
   with package Some_Queue is new Jr.Queue (T);
package Ordered_Queue is
   ...

etc.

-- 
Regards,
Dmitry A. Kazakov
www.dmitry-kazakov.de



  reply	other threads:[~2003-12-13 17:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-08 20:34 coding problems, please help Ratson Janiv
2003-12-08 21:31 ` Ratson Janiv
2003-12-09  7:48   ` Petter Fryklund
2003-12-09  8:40   ` Dmitry A. Kazakov
2003-12-13 15:13     ` Mr. J.
2003-12-13 17:19       ` Dmitry A. Kazakov [this message]
2003-12-13 14:58   ` Ratson Janiv
replies disabled

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