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!news3.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!nospam From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: Range excluding 0.0 Date: Sat, 29 Aug 2009 16:51:56 -0400 Organization: The Wasteland Message-ID: References: <6f1ce89e-7889-4d58-b0f8-1945727f5149@f33g2000vbm.googlegroups.com> <1j57hiw.vmezw81qexbi6N%csampson@inetworld.net> NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.0 Cancel-Lock: sha1:Cblb1sy+DDlkHnq4U4B1YWMkeaQ= User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Xref: g2news2.google.com comp.lang.ada:8053 Date: 2009-08-29T16:51:56-04:00 List-Id: In article <1j57hiw.vmezw81qexbi6N%csampson@inetworld.net>, csampson@inetworld.net (Charles H. Sampson) wrote: [...] > 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.) I'd be torn between these, but wrapping around the right end would be a problem with either: subtype Heading is Float range 0.0 .. 360.0; subtype Heading is Float range 0.0 .. Float'Pred(360.0); If the range were intended to model a craft's heading (perhaps in degrees, minutes & seconds), I'd be tempted to consider a modular type: type Heading is mod 360 * 60 * 60; This might make a relative change in heading easier to implement. -- John B. Matthews trashgod at gmail dot com