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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,db88d0444fafe8eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!f14g2000cwb.googlegroups.com!not-for-mail From: "Gene" Newsgroups: comp.lang.ada Subject: Re: Surprise in array concatenation Date: 1 Sep 2005 14:42:22 -0700 Organization: http://groups.google.com Message-ID: <1125610942.747981.280770@f14g2000cwb.googlegroups.com> References: <1125544603.561847.32140@g47g2000cwa.googlegroups.com> NNTP-Posting-Host: 129.29.227.2 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1125610947 22977 127.0.0.1 (1 Sep 2005 21:42:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 1 Sep 2005 21:42:27 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: f14g2000cwb.googlegroups.com; posting-host=129.29.227.2; posting-account=ZFTPUQ0AAABW8AYEou9RtrBd-zTxz0_y Xref: g2news1.google.com comp.lang.ada:4385 Date: 2005-09-01T14:42:22-07:00 List-Id: Ok. Thanks. And Jean-Pierre too. I completely agree with the marginal utility of other-than-1 least array indices. Still it makes complete sense for your code X: String(-99 .. -10_000); -- empty string Y: constant String := X & "Hello world." to generate an exception because the dest index range starts at -99. I have a much bigger problem with A : Int_Array(1..i - 1); B: Int_Array(i+1..10); ... ... := A & B; producing an array indexed from 1 when i = 2 and from 2 when i = 1. This still makes my head hurt. The starting point of a range of length zero is a perfectly logical concept. It's easy to draw such a range on a number line, for example. The fact that A'First is always defined is a tacit verification! So I'm still interested in an example that shows why the defined behavior makes sense. Gene