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,9d303864ae4c70ad X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-04-14 01:53:46 PST Path: archiver1.google.com!news1.google.com!news.glorb.com!wn52feed!worldnet.att.net!attbi_s04.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Expressing physical units (Was: Reprise: 'in out' parameters for functions) References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 24.6.132.82 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s04 1081932822 24.6.132.82 (Wed, 14 Apr 2004 08:53:42 GMT) NNTP-Posting-Date: Wed, 14 Apr 2004 08:53:42 GMT Organization: Comcast Online Date: Wed, 14 Apr 2004 08:53:46 GMT Xref: archiver1.google.com comp.lang.ada:7077 Date: 2004-04-14T08:53:46+00:00 List-Id: >example. When you divide a type by the same type, you get a >dimensionless number. Multiplication of like types is prohibited A "dimensionless number" still has a specific type so that alpha : degrees; x,y : feet; beta : radians := x/y+alpha; is illegal. So the type system does more than simply keep track of a set of exponents. >You then define operators for all the likely operations among these >types. Each type can be added to or subtracted from its own type, for See, for instance, chapter 2 of "Ada in Action" by Do-While Jones, ISBN 0-471-6078-8, Wiley, 1989 (also available on the internet but I don't have the URL).