From: "Peter C. Chapin" <PChapin@vtc.vsc.edu>
Subject: Re: Ada202X : alternate syntax for ranged scalars
Date: Fri, 26 Apr 2013 06:35:26 -0400
Date: 2013-04-26T06:35:26-04:00 [thread overview]
Message-ID: <f_CdnaQFC__zxefMRVn_vwA@giganews.com> (raw)
In-Reply-To: <09e7fbc6-ea75-4660-8ece-25c5b096afd5@googlegroups.com>
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
next prev parent reply other threads:[~2013-04-26 10:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-26 10:10 Ada202X : alternate syntax for ranged scalars Martin
2013-04-26 10:35 ` Peter C. Chapin [this message]
2013-04-26 12:26 ` Eryndlia Mavourneen
2013-05-02 2:11 ` Randy Brukardt
2013-05-02 13:29 ` Eryndlia Mavourneen
2013-04-26 12:53 ` AdaMagica
2013-04-26 14:46 ` Shark8
2013-04-28 2:11 ` Stephen Leake
2013-04-26 16:55 ` Jeffrey Carter
2013-05-02 23:05 ` Jerry
2013-05-14 22:30 ` Martin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox