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,7b6305d0d57a9f34 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.25.194 with SMTP id e2mr3290532pbg.7.1320236176900; Wed, 02 Nov 2011 05:16:16 -0700 (PDT) Path: p6ni62545pbn.0!nntp.google.com!news1.google.com!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!panix!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Normalizing array indices Date: Wed, 02 Nov 2011 08:16:16 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1320236176 13666 192.74.137.71 (2 Nov 2011 12:16:16 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 2 Nov 2011 12:16:16 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:ble2gYCsGp6lFgcxIvalzl2aqKw= Xref: news1.google.com comp.lang.ada:18788 Content-Type: text/plain; charset=us-ascii Date: 2011-11-02T08:16:16-04:00 List-Id: stefan-lucks@see-the.signature writes: > I am relieved that I am not the only one who happened to suffer from such a > problem. Still, I think a way to *specify* a formal subprogram parameter F > such that F'First is a given constant, regardless of A'First if A is the > actual parameter, would be ease testing and might be a good extension to > Ada (2020?). I think you want it on the type. Ada 9X proposed something like: type T (Last : Natural) is array (1..Last) of Blah; to fix the lower bound at 1. Slices should slide. It's still a good idea, and will probably still be a good idea in 2020. - Bob