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,f93747e1bf7a65bb X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.204.154.143 with SMTP id o15mr1384177bkw.4.1330426158337; Tue, 28 Feb 2012 02:49:18 -0800 (PST) Path: t13ni79364bkb.0!nntp.google.com!news2.google.com!postnews.google.com!cj6g2000vbb.googlegroups.com!not-for-mail From: Martin Newsgroups: comp.lang.ada Subject: Re: Banging the Ada Drum. Date: Tue, 28 Feb 2012 02:49:17 -0800 (PST) Organization: http://groups.google.com Message-ID: <83178b55-da15-421a-9747-451db4e495c0@cj6g2000vbb.googlegroups.com> References: <967bd137-f854-47e1-9d31-e9236c1c0d00@z31g2000vbt.googlegroups.com> NNTP-Posting-Host: 20.133.0.8 Mime-Version: 1.0 X-Trace: posting.google.com 1330426158 25534 127.0.0.1 (28 Feb 2012 10:49:18 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 28 Feb 2012 10:49:18 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: cj6g2000vbb.googlegroups.com; posting-host=20.133.0.8; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALERCFNK X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-02-28T02:49:17-08:00 List-Id: On Feb 28, 9:39=A0am, adacrypt wrote: [snip] FOR I in 30 ..1030 LOOP A(I) :=3D Alices_Digital_Signature.GetUnits(Numin =3D> I); B(I) :=3D Alices_Digital_Signature.GetUnits(Numin =3D> I); END LOOP; Don't explicitly re-use the array limits in loops, prefer: for I in A'Range loop A (I) :=3D ... Now the compiler may not inject checks on "A (I)" as it knows that the range of "I" is derived directly from "A". Why have different types for A and B - they are both just arrays of Integer with the same index. If you really want to make them different, you could do: type Index is range 30 .. 1_030; type A_Array_Type is array (Index) of Integer; type B_Array_Type is new A_Array_Type; A : A_Array_Type; B : B_Array_Type; BTW, are you assuming Integer is 32-bits? Because it doesn't have to be...it could be as small as 16 bits or larger than 32. -- Martin