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,fa18fb47ddd229a7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-19 08:17:19 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Proposed change to BC iterator parameters Date: Fri, 19 Dec 2003 16:17:18 +0000 (UTC) Organization: GMUGHDU Message-ID: References: NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1071850638 4047 134.91.1.34 (19 Dec 2003 16:17:18 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Fri, 19 Dec 2003 16:17:18 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:3561 Date: 2003-12-19T16:17:18+00:00 List-Id: Dmitry A. Kazakov wrote: : function Search (X : Container; Key : Item_Key) return Item is : begin : Enumerate : ( X, : procedure (I : Item) is : begin : if Get_Key (I) = Key then : return I out Search; -- Return through all nested contexts : end if; : end; : ); : raise Nothing_Found; : end Search; wouldn't an active(?) iteration do the job in a satisfying way, using is_done, element, and next, in a loop?