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,802ee425bbc3eba3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.223.40 with SMTP id qr8mr5941015pbc.0.1335840544723; Mon, 30 Apr 2012 19:49:04 -0700 (PDT) MIME-Version: 1.0 Path: r9ni118064pbh.0!nntp.google.com!news2.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.ecp.fr!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Quantified expressions: no support for restriction predicates Date: Mon, 30 Apr 2012 21:48:59 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <22242340.4097.1335486547825.JavaMail.geo-discussion-forums@vbki8> <796413.773.1335612600942.JavaMail.geo-discussion-forums@vbai3> <9912125.1780.1335724639338.JavaMail.geo-discussion-forums@ynee1> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1335840543 2530 69.95.181.76 (1 May 2012 02:49:03 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 1 May 2012 02:49:03 +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: 2012-04-30T21:48:59-05:00 List-Id: "Robert A Duff" wrote in message news:wcc7gwywcuh.fsf@shell01.TheWorld.com... > phil.clayton@lineone.net writes: > >> Is that actually possible for a Dynamic_Predicate? Section 3.2.4 Subtype >> Predicates, para 27/3 says: >> >> The discrete_subtype_definition of a loop_parameter_specification >> shall not denote ... or any subtype to which Dynamic_Predicate >> specifications apply. > > Yeah, I think you're right. The idea is that we didn't want hidden > inefficiencies. > > type T is new Integer with > Dynamic_Predicate => T mod 10_000 = 0; > for X in T loop -- Illegal! > > If that were legal, it would probably be grossly inefficient. Especially if Integer is a 64-bit type in this implementation. :-) My examples of this problem always used Long_Integer for this reason: type T is new Long_Integer with Dynamic_Predicate => T mod 2**30 = 0; for X in T loop -- Illegal! Randy.