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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c4cb2c432feebd9d X-Google-Thread: 1094ba,c4cb2c432feebd9d X-Google-Thread: 101deb,15c6ed4b761968e6 X-Google-Attributes: gid103376,gid1094ba,gid101deb,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Sat, 27 May 2006 09:57:10 -0500 From: Ludovic Brenta Newsgroups: comp.lang.ada,comp.lang.fortran,comp.lang.pl1 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> Date: Sat, 27 May 2006 16:56:58 +0200 Message-ID: <87fyivh5xh.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:QPuIpo60BUXUQpReN9eLt5YN+VM= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 62.235.56.108 X-Trace: sv3-uyVZ6kx8yIwVvlLfgWKhho6Fwt7VQ5Tu396HBa7d98UCxk+ocF6jqAU3/qTC+ieXvimspn9d7XEhXYu!I260hMQ0+p0xXtQrhSaRzPTMdzv59S5dwjjpWatX+Yd4fWTEDNd8e2bFw576bbEUYIvXfJ4SMA== X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:4545 comp.lang.fortran:10357 comp.lang.pl1:1771 Date: 2006-05-27T16:56:58+02:00 List-Id: "robin" writes: > "Simon Wright" writes: >> In Ada one should where possible use the 'Range attribute: > > Ideally yes, but in practice, such as in sorting and averaging, > the loop is often one or two short of the number of elements in the array. No problem: type Some_Array_Type is array (Positive range <>) of Something; procedure Walk (A : in Some_Array_Type) is begin for J in A'First .. A'Last - 1 loop ... end loop; end Walk; -- Ludovic Brenta.