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: a07f3367d7,73cb216d191f0fef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.8.4 with SMTP id n4mr1164156wia.0.1363383907842; Fri, 15 Mar 2013 14:45:07 -0700 (PDT) MIME-Version: 1.0 Path: bp2ni94360wib.1!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.130.MISMATCH!xlned.com!feeder1.xlned.com!news.astraweb.com!border5.a.newsrouter.astraweb.com!border2.nntp.ams.giganews.com!nntp.giganews.com!multikabel.net!newsfeed20.multikabel.net!news.mi.ras.ru!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.x-privat.org!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Tue, 12 Mar 2013 18:21:05 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <8klywqh2pf$.1f949flc1xeia.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1363130468 7039 69.95.181.76 (12 Mar 2013 23:21:08 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 12 Mar 2013 23:21:08 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2013-03-12T18:21:05-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:8klywqh2pf$.1f949flc1xeia.dlg@40tude.net... > On Tue, 12 Mar 2013 13:19:06 -0400, Robert A Duff wrote: ... >>> for I in Prime'Range loop -- What is this supposed to mean? >>> ... >> >> It doesn't mean anything -- it's illegal. > > Why Prime'Succ is legal then? You could argue that it should have been. But as it is an operation on a type, not a subtype, constraints and predicates aren't involved, so it doesn't need to be illegal. > And what about: > > for I in Prime'First..Prime'Last loop 'First and 'Last are also illegal on subtypes that have predicates. (See 3.2.4(26/3)). I argued that this is wrong, in that these are also operations returning values of the base type. The above means: for I in Prime'Base range Prime'First .. Prime'Last loop and that is quite meaningful. But there was concern over confusing this with for I in Prime loop which clearly involves the subtype. Making 'First and 'Last illegal also ties in with the impossibility of having an array indexed by a subtype with a predicate (which is nearly impossible to implement, especially because of the possibility of slices). That had to be illegal and the related features were carried along. Randy.