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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c4cb2c432feebd9d X-Google-Thread: 1094ba,c4cb2c432feebd9d X-Google-Attributes: gid103376,gid1094ba,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!spamkiller.gnilink.net!gnilink.net!trnddc08.POSTED!87bf9b22!not-for-mail From: Dan Nagle Reply-To: dnagle@erols.com Organization: Purple Sage Computing Solutions, Inc. User-Agent: Thunderbird 1.5.0.2 (X11/20060420) MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.fortran Subject: Re: Bounds Check Overhead References: <0ugu4e.4i7.ln@hunter.axlog.fr> <%P_cg.155733$eR6.26337@bgtnsc04-news.ops.worldnet.att.net> <6H9dg.10258$S7.9150@news-server.bigpond.net.au> <1hfv5wb.1x4ab1tbdzk7eN%nospam@see.signature> <4475DA61.3080001@comcast.net> <44762F55.4050106@cits1.stanford.edu> <87hd3d1472.fsf@ludovic-brenta.org> In-Reply-To: <87hd3d1472.fsf@ludovic-brenta.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <3cBdg.6255$oa3.2407@trnddc08> Date: Fri, 26 May 2006 10:59:11 GMT NNTP-Posting-Host: 70.108.4.182 X-Complaints-To: abuse@verizon.net X-Trace: trnddc08 1148641151 70.108.4.182 (Fri, 26 May 2006 06:59:11 EDT) NNTP-Posting-Date: Fri, 26 May 2006 06:59:11 EDT Xref: g2news2.google.com comp.lang.ada:4489 comp.lang.fortran:10285 Date: 2006-05-26T10:59:11+00:00 List-Id: Hello, Ludovic Brenta wrote: > And that's why Ada specifies that I cannot change inside the loop, and > is undefined outside the loop; see ARM 5.5 (9, 10). > > You seem to imply that Fortran has a similar rule, but that compilers > do not enforce that rule, and therefore have to perform range checking > to enforce a non-existent language rule about array access. I am > confused. Could you clarify? A loop index cannot be changed within the loop. Some compilers may have an option to allow older code to work without modification by allowing modification within the loop. (Basically, this is to avoid re-certification costs incurred when the code is modified in any way.) The value at loop termination is defined to be the last value within the loop, plus the increment. For a concurrent loop or for a forall, the index values are undefined outside the loop. -- Cheers! Dan Nagle Purple Sage Computing Solutions, Inc.