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,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc4f25d878383cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-13 14:16:59 PST Path: archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!wn1feed!wn3feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!rwcrnsc52.POSTED!not-for-mail From: "Mark Lundquist" Newsgroups: comp.lang.ada References: <11bf7180.0112070815.2625851b@posting.google.com> <9v0crt$bo2bi$1@ID-25716.news.dfncis.de> <9v37rs$cdmva$1@ID-25716.news.dfncis.de> Subject: Re: Dimensionality Checking (Ada 20XX) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: Date: Thu, 13 Dec 2001 19:33:01 GMT NNTP-Posting-Host: 204.127.202.211 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc52 1008271981 204.127.202.211 (Thu, 13 Dec 2001 19:33:01 GMT) NNTP-Posting-Date: Thu, 13 Dec 2001 19:33:01 GMT Organization: AT&T Broadband Xref: archiver1.google.com comp.lang.ada:17891 Date: 2001-12-13T19:33:01+00:00 List-Id: Hi Nick, I still have yet to get around to a full reply to this, so I thought I'd take a whack at the easy bits :-) "Nick Roberts" wrote in message news:9v37rs$cdmva$1@ID-25716.news.dfncis.de... > Sorry not to reply to this in full sooner. > > "Mark Lundquist" wrote in message > news:haTQ7.21816$wL4.49551@rwcrnsc51... > > > > > There's the question of private types. I feel that the requisite > > conversions > > > and other mixed operations should be provided for a private type > > explicitly > > > (in its package spec), and that these operations should do the requisite > > > conversion and checking, which may well be more complicated than mere > > > scaling and dimensionality. The unit facilities would, of course, be > > > applicable to those components which were of unit-specific (fixed-point) > > > types. > > > > I'm not sure quite what you're getting at there, but it sounds like it > might > > be related to an issue I've been thinking about, which is that these units > > currently would not be able to work with "quasi-numeric" abstractions such > > as people define for things like rational numbers, infinite-precision > > arithmetic, etc. > > ... > > Correct. (The example presented to me was Ada.Calendar.Time). There you go... Calendar.Time is a perfect example. > > 1) You have to be able to handle logarithmic units... that's easy, for a > > unit U: > > > > U'Log (B) -- denotes the log to the base B of U > > U'Exp (B) -- denotes B to the power U > > Or alternatively, sticking closer to my design, the package Ada.Units could > have functions Log and Exp. This presumably means that the dimensions of a > unit could be non-integral? No, you're holding your exponetiator backwards... here, like *this*... that's more like it :-) Non-integer exponents signify roots, not log/exp. Cheers, Mark -- -------------- Reply by email to: Mark dot Lundquist at ACM dot org Consulting services: http://home.attbi.com/~mlundquist2/consulting