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,3897c688f0b1f34c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.68.202.164 with SMTP id kj4mr8378323pbc.2.1366972526954; Fri, 26 Apr 2013 03:35:26 -0700 (PDT) Path: ln4ni691pbb.0!nntp.google.com!news.glorb.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 26 Apr 2013 05:35:26 -0500 Date: Fri, 26 Apr 2013 06:35:26 -0400 From: "Peter C. Chapin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada202X : alternate syntax for ranged scalars References: <09e7fbc6-ea75-4660-8ece-25c5b096afd5@googlegroups.com> In-Reply-To: <09e7fbc6-ea75-4660-8ece-25c5b096afd5@googlegroups.com> Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-b9tbLd/457XHT0TbqUwSe1goRDnmJL7ETtpxXZVS9nkmBHE2lcXW4XYAC+qKDuJfHZvXGJ0g/g89T/T!8KFSG+spv6KhG13ak4XkOjzwlQONrh85acHwLxAs4gn5Z79AxBmhUv1U5AyaL/I= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2177 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2013-04-26T06:35:26-04:00 List-Id: On 04/26/2013 06:10 AM, 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 I'm not sure how important this is, but your proposed syntax will cause fits for editors that do generic brace matching and/or auto-indentation. I understand that an Ada-aware editor could be expected to do the right thing, but it's nice when simple algorithms allow things to 'just work.' That said, Ada already causes simple syntax highlighting editors problems with the use of ' for both character constants and as an attribute delimiter. That doesn't seem like a good reason to make matters worse, however. Peter