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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.46.193 with SMTP id u62mr8066593iou.0.1480588391126; Thu, 01 Dec 2016 02:33:11 -0800 (PST) X-Received: by 10.157.15.143 with SMTP id d15mr2359400otd.2.1480588391075; Thu, 01 Dec 2016 02:33:11 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!n6no713820qtd.0!news-out.google.com!j8ni2685qtc.0!nntp.google.com!n6no713816qtd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 1 Dec 2016 02:33:10 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=91.55.208.177; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 91.55.208.177 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada 2012 Constraints (WRT an Ada IR) From: AdaMagica Injection-Date: Thu, 01 Dec 2016 10:33:11 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:32545 Date: 2016-12-01T02:33:10-08:00 List-Id: Am Dienstag, 29. November 2016 18:53:59 UTC+1 schrieb Niklas Holsti: > > Subtype P2 is Integer > > with Static_Predicate => P2 in 1..Integer'Last > > or else raise Constraint_Error; > > Perhaps it was obvious to you, but this differs from Positive in that > you cannot write P2'First or similar (illegal by RM 3.2.4(26/3)), but > you can write Positive'First. 'First, 'Last, 'Range are disallowed. There are 'First_Valid and 'Last_Valid instead. RM 5.5(7.2/4-7.3/4)