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 Path: g2news1.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!news-out.readnews.com!transit3.readnews.com!panix!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Copying rows in a two dimensional array. Date: Tue, 09 Feb 2010 17:58:36 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1265756302 14636 192.74.137.71 (9 Feb 2010 22:58:22 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 9 Feb 2010 22:58:22 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:kFlwL/OKN316riVdBEltHJkEh1c= Xref: g2news1.google.com comp.lang.ada:9053 Date: 2010-02-09T17:58:36-05:00 List-Id: tmoran@acm.org writes: > In general, the index of a found item in an array search is more > helpful than the offset. For instance, > function Find_Biggest(X : in Array_Type) return Index_Type; > leads to a cleaner recursive (or multitasking) divide-and-conquer > routine than returning an offset into the array. The offset is > a means to the end, while the index is the end itself, and you can't > return the index if you don't know the X'first. Right, although it might be better to return a cursor. - Bob