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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4afb8d38e153e827 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-09 00:56:01 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-atanamir.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: inheritence and generic Date: Tue, 09 Dec 2003 10:00:19 +0100 Message-ID: <8c3btvojvf1lth380frkl1fse0eo96574c@4ax.com> References: <3fd52491@news.barak.net.il> NNTP-Posting-Host: tar-atanamir.cbb-automation.de (212.79.194.116) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1070960159 73972265 212.79.194.116 ([77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:3264 Date: 2003-12-09T10:00:19+01:00 List-Id: On Tue, 9 Dec 2003 03:23:25 +0200, "Ratson Janiv" wrote: >I have the following code : > >generic > >type Bounded_Q is new Queue with private; > > >package Jr.Queue.Max_Queue.Bounded is > > >type Max_Bounded_Queue is new Max_Queue with private; > > >procedure Push(Q: in out Max_Bounded_Queue ; Item:T); > >private > >type Max_Bounded_Queue is new Max_Queue with record > >BQ : Bounded_Q; > >end record; > >end Jr.Queue.Max_Queue.Bounded; > >--------------------------------------------------------------------------- > >package body Jr.Queue.Max_Queue.Bounded is > > >procedure Push(Q: in out Max_Bounded_Queue;Item:T) is > >begin > >Q.BQ.Push(Q,Item); Shouldn't it be: Q.BQ.Push (Q.BQ, Item); But the design looks strange. You derive Max_Bounded_Queue from Max_Queue and also aggregate Queue in it. In effect it will be twice a queue. Should it be so? -- Regards, Dmitry Kazakov http://www.dmitry-kazakov.de