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,fe5e779eaf4ecf02 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!x35g2000hsb.googlegroups.com!not-for-mail From: Matthew Heaney Newsgroups: comp.lang.ada Subject: Re: How to loop (elegant) throug a vector ? Date: Mon, 23 Jun 2008 10:08:32 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 66.162.65.129 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1214240913 3963 127.0.0.1 (23 Jun 2008 17:08:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 23 Jun 2008 17:08:33 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x35g2000hsb.googlegroups.com; posting-host=66.162.65.129; posting-account=umyUbgkAAADe5rQC4VzV-ffCoH4N30u3 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:824 Date: 2008-06-23T10:08:32-07:00 List-Id: On Jun 20, 9:19=A0am, Reinert Korsnes wrote: > =A0 =A0for k in 1 .. Positive(X.Length) loop > =A0 =A0 =A0 =A0do_something(X.Element(k)); > =A0 =A0end loop; > > Could anybody suggest improvements for the three > last lines in the code? for K in X.First_Index .. X.Last_Index loop Do_Something (X.Element (K)); end loop;