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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9def90e15d8accc X-Google-Attributes: gid103376,public X-Google-Thread: 16adf3,41810a0fecb9b060 X-Google-Attributes: gid16adf3,public X-Google-Thread: 12f38b,41810a0fecb9b060 X-Google-Attributes: gid12f38b,public X-Google-ArrivalTime: 2003-12-13 09:13:45 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!dialin-145-254-043-181.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada,news.admin.lang.ada,news.groups.lang.ada Subject: Re: coding problems, please help. Followup-To: comp.lang.ada Date: Sat, 13 Dec 2003 18:19:55 +0100 Organization: At home Message-ID: References: <3fd4e0e2$1@news.barak.net.il> <3fd4ee3b$1@news.barak.net.il> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-043-181.arcor-ip.net (145.254.43.181) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.uni-berlin.de 1071335623 2911827 145.254.43.181 ([77047]) User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:3446 Date: 2003-12-13T18:19:55+01:00 List-Id: Mr. J. wrote: > Dmitry A. Kazakov wrote in message > news:... >> On Mon, 8 Dec 2003 23:31:32 +0200, "Ratson Janiv" >> 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