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,2ac407a2a34565a9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.42.159.9 with SMTP id j9mr498834icx.6.1330548426390; Wed, 29 Feb 2012 12:47:06 -0800 (PST) Path: h9ni24149pbe.0!nntp.google.com!news1.google.com!goblin1!goblin2!goblin.stu.neva.ru!newsfeed1.swip.net!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Array Help? Date: Wed, 29 Feb 2012 20:47:04 +0000 Organization: A noiseless patient Spider Message-ID: References: <10615783-d4a9-4cbd-8971-53ba1100d6a0@b18g2000vbz.googlegroups.com> <17412419.40.1330534213855.JavaMail.geo-discussion-forums@vbva11> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="21226"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ZFJTuVG3RIaAuRz4lf94R6BA0iEiIVRo=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:gglJQctYsPUu1nAq/kjywQso9Iw= sha1:R01tnI7tEkkyJdWmj6MRg7dT8Ss= Content-Type: text/plain; charset=us-ascii Date: 2012-02-29T20:47:04+00:00 List-Id: Robert A Duff writes: > Ludovic Brenta writes: > >> Doesn't that preclude slices that don't start at 'First? > > Yes. > >> Supposing your declarations, can you call >> >> procedure Foo (Param : in out Integer_Array); >> >> like this: >> >> declare >> A : Integer_Array (1 .. 10) := (others => 0); >> begin >> Foo (A (3 .. 8)); >> end; >> >> ? > > That will raise C_E. IMHO, that's a language design flaw -- inside > Foo, Param'First ought to be 1. The fact that Foo can see that > it came from a slice is a leak of abstraction. I know that GNAT is a work-in-progress, but it doesn't raise C_E with GNAT GPL 2011.