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=ham 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!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!b680011b!not-for-mail From: Dick Hendrickson User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.fortran Subject: Re: Ada vs Fortran for scientific applications References: <0ugu4e.4i7.ln@hunter.axlog.fr> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <%P_cg.155733$eR6.26337@bgtnsc04-news.ops.worldnet.att.net> NNTP-Posting-Host: 5caadabf0185b54d8ee21fa03c8f2954 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1148483963 5caadabf0185b54d8ee21fa03c8f2954 (Wed, 24 May 2006 15:19:23 GMT) NNTP-Posting-Date: Wed, 24 May 2006 15:19:23 GMT Organization: AT&T Worldnet Date: Wed, 24 May 2006 15:19:23 GMT Xref: g2news2.google.com comp.lang.ada:4412 comp.lang.fortran:10197 Date: 2006-05-24T15:19:23+00:00 List-Id: robin wrote: > "Dick Hendrickson" wrote in message > news:PkHcg.90575$Fs1.7198@bgtnsc05-news.ops.worldnet.att.net... > >>Ada's is surely better. Knowing that a subscript has to be >>in range, because it's checked when a value is assigned to >>the subscript variable, has to be more efficient than what >>Fortran can do. In general, Fortran has to check the value >>of the subscripts on every array reference. > > > It can do this only if it is a compiler option. > It is not a feature the language. There's a ambiguous "it" in those sentences. ;) But, if "it" refers to Fortran, subscript bounds rules ARE a feature of the language. You are NEVER allowed to execute an out-of-bounds array reference in a Fortran program. In practice, the historical run-time cost of checking bounds was [thought to be] too high, so compilers either didn't do it, or did it under some sort of command line option control. Dick Hendrickson > > >> In practice, >>most array references take place in DO loops and compilers >>can usually hoist the checks outside the loop, so they have >>minimal cost at run time. > > >