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,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.58.77 with SMTP id f13mr29848943qah.7.1366971002047; Fri, 26 Apr 2013 03:10:02 -0700 (PDT) X-Received: by 10.49.40.168 with SMTP id y8mr35206qek.9.1366971001995; Fri, 26 Apr 2013 03:10:01 -0700 (PDT) Path: ef9ni16888qab.0!nntp.google.com!gp5no7128890qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 26 Apr 2013 03:10:01 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=20.133.0.8; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G NNTP-Posting-Host: 20.133.0.8 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <09e7fbc6-ea75-4660-8ece-25c5b096afd5@googlegroups.com> Subject: Ada202X : alternate syntax for ranged scalars From: Martin Injection-Date: Fri, 26 Apr 2013 10:10:02 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2013-04-26T03:10:01-07:00 List-Id: 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