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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1cb75f0476fe2d1a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!newsfeed01.chello.at!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Half Constrained Array Types and Slices Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Fri, 3 Mar 2006 09:57:29 +0100 Message-ID: <1awx3mmvouc9d$.16w4ud1feegy9$.dlg@40tude.net> NNTP-Posting-Date: 03 Mar 2006 09:57:29 MET NNTP-Posting-Host: e2753454.newsread4.arcor-online.net X-Trace: DXC=eDCg9fb4iPJeoBec=`Q1lF:ejgIfPPldDjW\KbG]kaMHQc4L4[MA2T@7WZ_=:m158N[6LHn;2LCVN7enW;^6ZC`DIXm65S@:3>O X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:3253 Date: 2006-03-03T09:57:29+01:00 List-Id: On Fri, 03 Mar 2006 05:15:00 GMT, Jeffrey R. Carter wrote: > In that case, this would be how you'd deal with slices of half-constrained > arrays if you wanted to keep the bounds; the base type would be unconstrained > and the first-named subtype would be partially constrained. But the anonymous type of a slice is not one of the original array. It could even be not a subtype. It becomes obvious if we consider (not allowed in Ada) slices of two-dimensional arrays (submatrix, column, row, element.) I cannot see how an index constraint of the original array subtype could propagate down to the slice. So I don't much trust the idea of sliding indices in slices. Sliding might be in the contract of ":=" or "&" when arguments are slices. And in any case that depends on the index type, which has to be (at least) ordered. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de