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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.160.65 with SMTP id m1mr13732615qax.2.1367535935812; Thu, 02 May 2013 16:05:35 -0700 (PDT) X-Received: by 10.182.237.108 with SMTP id vb12mr147356obc.18.1367535935687; Thu, 02 May 2013 16:05:35 -0700 (PDT) Path: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!news.glorb.com!m7no517446qam.0!news-out.google.com!y6ni0qax.0!nntp.google.com!m7no517443qam.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 2 May 2013 16:05:35 -0700 (PDT) In-Reply-To: <09e7fbc6-ea75-4660-8ece-25c5b096afd5@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=97.117.195.126; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG NNTP-Posting-Host: 97.117.195.126 References: <09e7fbc6-ea75-4660-8ece-25c5b096afd5@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <649d00c5-8afc-4260-ac77-a11a066b3573@googlegroups.com> Subject: Re: Ada202X : alternate syntax for ranged scalars From: Jerry Injection-Date: Thu, 02 May 2013 23:05:35 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Original-Bytes: 2324 Xref: number.nntp.dca.giganews.com comp.lang.ada:181367 Date: 2013-05-02T16:05:35-07:00 List-Id: On Friday, April 26, 2013 3:10:01 AM UTC-7, Martin wrote: > The default scalar declarations are 'closed ranges', i.e. include both upper and lower in the valid range. > Sometimes we would like to specify a 'half open range', e.g. values of degree from 0.0 up to BUT NOT INCLUDING 360.0. > I'm floating (pun intended) an alternative syntax for specify such ranges (or 'intervals')... > type Degree is digits 15 range [0.0, 360.0); -- includes 0 but not 360 > > The current 'closed ranges' would be: > type Degree is digits 15 range [0.0, 360.0]; -- includes 0 and 360 > > Fully open range, i.e. not include 0.0 or 360.0: > type Degree is digits 15 range (0.0, 360.0); -- includes neither 0 nor 360 > > A 'reverse' half open range, i.e. not include 0.0 but including 360.0: > type Degree is digits 15 range (0.0, 360.0]; -- excludes 0 but includes 360 > > Usual rules would apply to the simple expression between the brackets. > > Any thoughts? > -- Martin If Ada introduces [ and ] please let them be for array indices. Jerry