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,5f5a48f21d7f7525 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!w31g2000yqb.googlegroups.com!not-for-mail From: Gautier write-only Newsgroups: comp.lang.ada Subject: Re: Inferring array index type from array object Date: Wed, 23 Jun 2010 06:12:17 -0700 (PDT) Organization: http://groups.google.com Message-ID: <0446cf3d-37ff-4fff-9aa3-fd27409b4141@w31g2000yqb.googlegroups.com> References: <6b20ed09-efc1-4df7-90f9-5e141482e8d0@d37g2000yqm.googlegroups.com> NNTP-Posting-Host: 206.122.158.4 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1277298737 26662 127.0.0.1 (23 Jun 2010 13:12:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 23 Jun 2010 13:12:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w31g2000yqb.googlegroups.com; posting-host=206.122.158.4; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:11887 Date: 2010-06-23T06:12:17-07:00 List-Id: Perhaps empty ranges have played a role for designers not going too far into defining what you would like (some "subtype S_range is S'Range", or "type S_range is new S'Range" ?) ? procedure String_range is subtype Index_empty is Positive range 1..0; I1: Index_empty:= Index_empty'First; -- S: constant String:= ""; I2 : Positive range S'Range:= S'First; begin null; end; There, GNAT produces a Constraint_Error for any of I1 or I2, on the := lines. G.