comp.lang.ada
 help / color / mirror / Atom feed
From: Egil H H <ehh.public@gmail.com>
Subject: Re: "for E of Vector1 loop" equivalent  to "for n in Vector1.First_Index ..  Vector1.Last_Index loop ?
Date: Mon, 19 Sep 2016 01:02:32 -0700 (PDT)
Date: 2016-09-19T01:02:32-07:00	[thread overview]
Message-ID: <068b9a59-45a1-4dfc-a120-3a3fc59af456@googlegroups.com> (raw)
In-Reply-To: <d86c72d5-96e7-4572-a1c0-6b5b5e51b8ab@googlegroups.com>

On Monday, September 19, 2016 at 9:50:27 AM UTC+2, reinkor wrote:
> I like the construct
> 
> for E of Vector1 loop
> ..
> end loop;
> 
> but is there a possibility somehow to keep this style 
> and execute opposite direction

sure, just add the "reverse" keyword, just as for other for loops: 

for E of reverse Vector1 loop
..
end loop;

-- 
~egilhh


  reply	other threads:[~2016-09-19  8:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19  7:23 "for E of Vector1 loop" equivalent to "for n in Vector1.First_Index .. Vector1.Last_Index loop ? reinkor
2016-09-19  7:37 ` Stephen Leake
2016-09-19  7:50   ` reinkor
2016-09-19  8:02     ` Egil H H [this message]
2016-09-19  8:41       ` reinkor
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox