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,421379614df5a9cd X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!backlog2.nntp.dca.giganews.com!nntp.nethere.com!news.nethere.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 29 Aug 2009 12:47:20 -0500 Newsgroups: comp.lang.ada Subject: Re: Range excluding 0.0 From: csampson@inetworld.net (Charles H. Sampson) Date: Sat, 29 Aug 2009 10:47:17 -0700 Message-ID: <1j57hiw.vmezw81qexbi6N%csampson@inetworld.net> References: <6f1ce89e-7889-4d58-b0f8-1945727f5149@f33g2000vbm.googlegroups.com> User-Agent: MacSOUP/2.8.2 (Mac OS X version 10.4.11 (PPC)) X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-vLsjjPyVF6iel4YRcZJ8keYz91FcxgXRoXAGEmmOFNbH2xD8mU6yR2i+UlO61w6jLP9Op9FrbxJOsW1!4MupxmL4+TQAqivX7v4eh8Me4qIMrs0cwzwcJcoITNqhVKO1MYp/C+8RWeEb3rO7zu8NdxbCX0bz!+lqDwKyqbjXANdCKL+b+Lue14Kc= X-Complaints-To: abuse@nethere.com X-DMCA-Complaints-To: abuse@nethere.net 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.39 X-Original-Bytes: 2148 Xref: g2news2.google.com comp.lang.ada:8051 Date: 2009-08-29T10:47:17-07:00 List-Id: vlc wrote: > > I would like to declare a subtype of Float which ranges from 0.0 > (excluded) to Float'Last. Is there a way to exclude the 0.0 from the > range? You've already got the answer you need, but your question brings up another that I've recently been puzzled about. Why doesn't Ada allow all four flavors of ranges commonly used by mathematicians (and others): individually including or excluding the endpoints? I've been around Ada since close to the beginning and I don't recall that this was ever discussed. At the same time, I have this vague memory that one of the candidate languages might have had it, but I can't remember which one it might have been. This is not just theoretical musing. I currently work in the world of compasses, so a range of the form [0.0 .. 360.0) is quite natural. (That notation is neither mathematical nor Ada. I hope its meaning is clear.) Charlie -- All the world's a stage, and most of us are desperately unrehearsed. Sean O'Casey