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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.13.194.134 with SMTP id e128mr1860810ywd.20.1496755143609; Tue, 06 Jun 2017 06:19:03 -0700 (PDT) X-Received: by 10.157.26.93 with SMTP id u29mr262822otu.2.1496755143571; Tue, 06 Jun 2017 06:19:03 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!y44no639452qth.1!news-out.google.com!k7ni7273itk.0!nntp.google.com!67no1575056itx.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 6 Jun 2017 06:19:03 -0700 (PDT) In-Reply-To: <35c6ac5a-3295-4fa4-8545-ca76c113dde4@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=84.131.51.223; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 84.131.51.223 References: <35c6ac5a-3295-4fa4-8545-ca76c113dde4@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Arrays in Ada 2012 From: AdaMagica Injection-Date: Tue, 06 Jun 2017 13:19:03 +0000 Content-Type: text/plain; charset="UTF-8" Xref: news.eternal-september.org comp.lang.ada:46900 Date: 2017-06-06T06:19:03-07:00 List-Id: Am Dienstag, 6. Juni 2017 13:47:06 UTC+2 schrieb Anatoly Chernyshev: > Hello everyone, > > Consider the following nice Ada 2012 construct: > > -- > procedure test is > type a1 is array(1..35,1..35,1..35,1..35,1..35,1..35) of long_long_integer; > ab:a1; > cnt:long_long_integer:=0; > begin > for e of ab loop > cnt:=cnt+1; > e:=cnt; > end loop; > end test; > -- > > Is there a way (e.g. some attribute) to find the indices of the array for a current e within the cycle above? No, there are no attributes giving the current indices. You have to use the nested loops form if you need the indices.