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-11 09:59:11 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!cox.net!newspeer1-gui.server.ntli.net!ntli.net!news8-gui.server.ntli.net.POSTED!53ab2750!not-for-mail From: "martin.m.dowie" Newsgroups: comp.lang.ada References: <3CD88FBD.4070706@telepath.com> <3CD91E31.1060004@telepath.com> <3CDBD673.FF452A3D@otelco.net> Subject: Re: Announce: Grace project site operational X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Sat, 11 May 2002 17:58:55 +0100 NNTP-Posting-Host: 62.252.152.199 X-Complaints-To: abuse@ntlworld.com X-Trace: news8-gui.server.ntli.net 1021136345 62.252.152.199 (Sat, 11 May 2002 17:59:05 BST) NNTP-Posting-Date: Sat, 11 May 2002 17:59:05 BST Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:23902 Date: 2002-05-11T17:58:55+01:00 List-Id: "Preben Randhol" wrote in message news:slrnadq9vg.21p.randhol+abuse@kiuk0156.chembio.ntnu.no... > On Fri, 10 May 2002 11:38:14 -0400, Marin David Condic wrote: > > Example: There are times when one might want to have unique types for > > Volts and Amps and Ohms (reading from different sensors) and there are > > times when this would only be extremely painful (when calculating > > typical electrical relationships) and what exactly would the type > > conversions mean anyway? If I say "Amps := Amps_Type (Volts) / > > Amps_Type (Ohms) ;" am I really converting volts to amps and ohms to > > amps as it appears? Not exactly as it reads. So there can be an awful > > large amount of gray area in deciding when to create types and when > > doing so is going to just make things worse. But I can usually spot > > "worse" when I see it. :-) > > I agree. > [snip] In these sorts of cases I would use an 'SI_Units' package (like the "Whitaker" one) that provided all the nice conversion for me... e.g. function "/" (V : Volts; O : Ohms) return Amps; etc I find this _very_ convenient and highly reusable. Anyone for a 'Grace.SI_Units' package?..