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,ff949d1e0d505dfc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-13 08:26:38 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: mheaney@on2.com (Matthew Heaney) Newsgroups: comp.lang.ada Subject: Re: Using Grace.Lists.Unbounded in WindowsXP/GNAT3.15p Date: 13 Mar 2003 08:26:37 -0800 Organization: http://groups.google.com/ Message-ID: <1ec946d1.0303130826.480cd301@posting.google.com> References: <3e705a78$1@news.wineasy.se> NNTP-Posting-Host: 66.162.65.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1047572798 17037 127.0.0.1 (13 Mar 2003 16:26:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 13 Mar 2003 16:26:38 GMT Xref: archiver1.google.com comp.lang.ada:35292 Date: 2003-03-13T16:26:38+00:00 List-Id: "Frank" wrote in message news:<3e705a78$1@news.wineasy.se>... > > The big picture(but not fully coded in this example): > What I want to achieve is to be able to traverse a list, and based on > information in the > node, decide to remove it from the current position in the list and reinsert > it at the end. > This is done to postpone the calculation of the Node until all other Nodes > have been calculated. You said you're using GRACE, but here's how you'd do it in Charles: procedure Op (List : in List_Subtype) is I : Iterator_Type := First (List); J : constant Iterator_Type := Back (List); begin while I /= J loop declare E : Element_Subtype renames To_Access (I).all; begin if Predicate (E) then Splice (List, Before => J, Iterator => I); return; end if; end; I := Succ (I); end loop; end Op; http://home.earthlink.net/~matthewjheaney/charles/