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,fdc75443ea18fb32 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-01 11:32:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!paloalto-snh1.gtei.net!lsanca1-snf1!news.gtei.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3C093056.A4F52211@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Queue References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 01 Dec 2001 19:32:46 GMT NNTP-Posting-Host: 209.86.207.164 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1007235166 209.86.207.164 (Sat, 01 Dec 2001 11:32:46 PST) NNTP-Posting-Date: Sat, 01 Dec 2001 11:32:46 PST Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Sat, 01 Dec 2001 11:32:47 PST (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:17285 Date: 2001-12-01T19:32:46+00:00 List-Id: steve wrote: > > i have sent up a queue package using head and tail pointers, and have > procedures for adding, removing and nodes. But l am haveing trouble writing > a procedure for displaying the nodes. Can anyone send me a procedure where > you can display all the nodes. That's quite simple: generic -- Display_Nodes with function End_Of_Nodes return Boolean; with function Get (Q : Queue) return Node; with procedure Next (Q : in out Queue); with procedure Display (N : in Node); procedure Display_Nodes (Q : in out Queue); procedure Display_Nodes (Q : in out Queue) is -- null; begin -- Display_Nodes All_Nodes : loop exit All_Nodes when End_Of_Nodes (Q); Display (N => Get (Q) ); Next (Q => Q); end loop All_Nodes; end Display_Nodes; Seriously, since we have no idea what your queue package looks like, what a node looks like, or what you mean by "display", how can you expect anyone here to be able to do this? If, as seems likely, this is a homework assignment, no one here will do your homework for you. Your first place to go for help should be your instructor. If you have specific problems and your instructor can't help you, then we might be able to help with a clearly stated and narrowly focused question. -- Jeff Carter "We call your door-opening request a silly thing." Monty Python & the Holy Grail