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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d45251e6e639e463 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.238.65 with SMTP id vi1mr154152pbc.7.1340840282918; Wed, 27 Jun 2012 16:38:02 -0700 (PDT) Path: l9ni27475pbj.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: questions on using the array component iterator for 2012 Date: Wed, 27 Jun 2012 16:31:33 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 96.2.54.122 Mime-Version: 1.0 X-Trace: posting.google.com 1340840282 19258 127.0.0.1 (27 Jun 2012 23:38:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 27 Jun 2012 23:38:02 +0000 (UTC) Cc: nma@12000.org In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=96.2.54.122; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-06-27T16:31:33-07:00 List-Id: On Saturday, June 23, 2012 7:02:18 AM UTC-5, Nasser M. Abbasi wrote: > For example, assume I write > FOR e of A LOOP > e :=3D e + 1 ; > END LOOP > [...] >=20 > But suppose I want to implement say a Jacobi relaxation > iteration to solve a 2D Laplace pde on that grid, which > is defined to update each element in the grid using >=20 > A(i,j) :=3D (1/4) ( A(i-1,j)+A(i+1,j)+A(i,j-1)+A(i,j+1) >=20 > where here 'i' is row index, and 'j' is column index. Well the problem is that the "FOR E IN ..." loop is conceptually different = from a "FOR Index IN Array_Variable'RANGE" loop. The difference is that in = the former you don't care what the index/indices are, you just want to appl= y the same procedure to each element. Given that needing the index is sometimes wanted, the designers may have ad= ded a 'Index(X) attribute, I don't really know because I've not had the inc= lination to explore the new loop in such depth.