comp.lang.ada
 help / color / mirror / Atom feed
From: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov)
Subject: Re: Another Idea for Ada 20XX
Date: Fri, 07 Dec 2001 09:01:38 GMT
Date: 2001-12-07T09:01:38+00:00	[thread overview]
Message-ID: <3c107e34.1089468@News.CIS.DFN.DE> (raw)
In-Reply-To: 45601fc.0112061655.29c31a48@posting.google.com

On 6 Dec 2001 16:55:38 -0800, byhoe@users.sourceforge.net (Adrian Hoe)
wrote:

>Wes Groleau <wgroleau@usa.com> wrote in message news:<3C0FAD3D.64ACC870@usa.com>...
>> 
>>   function "+" (Left   : Meters;
>>                 Right  : Kilometers)
>>                 return : Meters;
>
>Consider this:
>
>function "+" (Left   : Meters;
>              Right  : Inches)
>              return Meters;
>
>What kind of precision in the conversion of Inches to Meters if Unit
>Checking and Conversion are to be part of Ada? Do I/we have the
>liberty to select the precision I/we want?

A possible solution is that there should be same precision of Left,
Right and result. They should have exactly same representation [in
some unit system, like SI] and Inches would be just a view of some
length [which corresponds to the physical nature of meters and
inches]. So

    X : Inches := 5;  -- Means  X := 0.127 [m]

Unfortunately the price of this is that it will be impossible to have
precise computations in non-metric units and range problems [eV is
pretty small when compared with J].

However, it is thinkable [and preferable] that Ada would provide not
an implementation of some unit system, but rather facilities to do it.
Then of course, a user might just create its own unit system like
(foot, second, pound) and have meters as a view of feets. He would
also be able to create two different systems and define conversions
between them with necessary care of precision.

>How exactly this will be implemented by the new annex of Ada
>(perhaps)?

Regards,
Dmitry Kazakov



  reply	other threads:[~2001-12-07  9:01 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-02 19:51 Another Idea for Ada 20XX Gautier Write-only-address
2001-12-02 22:36 ` James Rogers
2001-12-03 12:44   ` Marc A. Criley
2001-12-03 14:29     ` Larry Kilgallen
2001-12-04  0:25       ` Marc A. Criley
2001-12-04  1:40   ` Adrian Hoe
2001-12-04  1:56     ` Larry Kilgallen
2001-12-04 16:08       ` Wes Groleau
2001-12-04 17:48         ` Larry Kilgallen
2001-12-09 23:02           ` Nick Roberts
2001-12-10 16:22             ` Stephen Leake
2001-12-10 17:11               ` Wes Groleau
2001-12-10 20:30               ` Robert C. Leif, Ph.D.
2001-12-10 20:59                 ` Wes Groleau
2001-12-10 17:09             ` Wes Groleau
2001-12-10 17:32               ` Larry Kilgallen
2001-12-04 19:59         ` Vincent Marciante
2001-12-04 20:20           ` Wes Groleau
2001-12-04 22:18         ` Matthew Heaney
2001-12-06  4:14         ` Richard Riehle
2001-12-06 17:39           ` Wes Groleau
2001-12-07  0:55             ` Adrian Hoe
2001-12-07  9:01               ` Dmitry A. Kazakov [this message]
2001-12-07 11:49           ` Tarjei T. Jensen
2001-12-07 22:51           ` Dimensions (was Re: Another Idea for Ada 20XX) Mark Lundquist
2001-12-08  3:52             ` Richard Riehle
2001-12-08  5:28               ` Mark Lundquist
2001-12-08 18:59                 ` Matthew Heaney
2001-12-08 21:23               ` Wes Groleau
2001-12-09 22:15               ` Robert C. Leif, Ph.D.
2001-12-10 14:09             ` Ian
2001-12-03 14:56 ` Another Idea for Ada 20XX Mark Lundquist
2001-12-06 15:27   ` Philip Anderson
2001-12-07 22:51     ` Mark Lundquist
2001-12-10  9:01       ` Dmitry A. Kazakov
  -- strict thread matches above, loose matches on Subject: below --
2001-12-02 21:24 Gautier Write-only-address
2001-12-03 14:56 ` Mark Lundquist
2001-12-02 16:01 James Rogers
2001-12-02 16:38 ` Preben Randhol
2001-12-02 22:26   ` James Rogers
2001-12-02 21:19 ` Patrick Hohmeyer
2001-12-02 21:26 ` Lutz Donnerhacke
2001-12-02 23:49   ` Patrick Hohmeyer
2001-12-03  6:06     ` Wilhelm Spickermann
2001-12-03  8:58     ` Lutz Donnerhacke
2001-12-03 13:40     ` Thomas Koenig
2001-12-03  0:21 ` Robert C. Leif, Ph.D.
2001-12-03  0:35 ` Robert Dewar
2001-12-03  1:33   ` James Rogers
2001-12-03 12:34     ` Dirk Dickmanns
2001-12-03 14:56 ` Mark Lundquist
2001-12-03 15:12   ` Lutz Donnerhacke
2001-12-03 17:00   ` chris.danx
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox