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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1dd28d5040ded1f8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-13 17:45:07 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!psiuk-p2!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Announce: Grace project site operational Date: Mon, 13 May 2002 09:07:30 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <3CD88FBD.4070706@telepath.com> <3CD91E31.1060004@telepath.com> <3CDBD673.FF452A3D@otelco.net> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1021295251 3921 136.170.200.133 (13 May 2002 13:07:31 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 13 May 2002 13:07:31 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:23985 Date: 2002-05-13T13:07:31+00:00 List-Id: Hard to say. Depends somewhat on the app. I might create a whole separate floating point type for electrical calculations where I intend to mix volts and amps and ohms. That would keep it separate from whatever other calculations might be going on. In this case, I don't know that ranges would figure into it - conceptually at least the calculations can go to +/- infinity, so any subtype with a range constraint might be strictly for hardware concerns. Unless, of course, you're getting the values from some real world source with real world limitations. My point is that you have to give some careful thought to creating types and that doing it for every identifiable unique item is not usually smart. Decisions should be made with some sensitivity as to what the types represent and how much mixing together of the different types is needed. I'd love to see some textbook on computer philosophy that attempted to describe how to make those decisions, but I've not run into any. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com "Preben Randhol" wrote in message news:slrnadq9vg.21p.randhol+abuse@kiuk0156.chembio.ntnu.no... > > Say you instead defined them as subtypes of Float (for this example) > with allowed ranges for each type, would that be an enhancement over > only using Float? >