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-Thread: 103376,1fa85f3df5841ae1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!feed.news.tiscali.de!news.belwue.de!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Tue, 26 Apr 2005 16:12:02 +0200 From: Georg Bauhaus Organization: future apps GmbH User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050324 Debian/1.7.6-1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada.Containers.Vectors - querying multiple elements References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <426e4c2b$0$7515$9b4e6d93@newsread2.arcor-online.net> NNTP-Posting-Date: 26 Apr 2005 16:11:55 MEST NNTP-Posting-Host: 6566e7da.newsread2.arcor-online.net X-Trace: DXC=fV7jlSUm]=jCUhGd:LVK2eQ5U85hF6f;djW\KbG]kaMh:cmYYm_h3\cmm_ZVENAW>lljUVjRQ60?bVmnOeiOY3@ng[50F7T5IOb X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:10717 Date: 2005-04-26T16:11:55+02:00 List-Id: Duncan Sands wrote: > procedure Query_Elements > (Container : in Vector; > First_Index : in Index_Type; > Last_Index : in Extended_Index; > Process : not null access procedure (Elements : in Element_Array)); > It would be good to have for both > efficiency reasons and simple implementation of certain classes of algorithms. > In my case I have a "divide and conquer" recursive algorithm which while it > can be written using the current package, would be simpler to write if something > like Query_Elements existed. Couldn't you use Cursors, here: Cursor := find_or_something(container, ...); there: constant Cursor := find_or_something(container, ...); while here /= there loop ... next(here); end loop; -- Georg