From: William C. Brennan <brennan@netaxs.com>
Subject: Re: Safe Units Handling in Ada
Date: Wed, 22 May 2002 22:44:13 GMT
Date: 2002-05-22T22:44:13+00:00 [thread overview]
Message-ID: <01HW.B91197820000C3D90E449050@netnews.netaxs.com> (raw)
In-Reply-To: 3CEB7124.4050604@blancolioni.org
On Wed, 22 May 2002 6:21:24 -0400, Fraser wrote
(in message <3CEB7124.4050604@blancolioni.org>):
> Fraser Wilson wrote:
>> After a recent discussion, I put together Macks, a small program that
>> generates Ada packages for dealing with physical units in a type safe
>> way.
>
This units-generator package looks terrific. I've been doing this stuff by hand
for too long.
Just one comment...
The generated example.ads yields:
...
function "*"
(Left : Kilogram;
Right : Kilogram) -- This is good, we want it abstract.
return Kilogram
is abstract;
function "/"
(Left : Kilogram; -- We want this one abstract too.
Right : Kilogram)
return Kilogram
is abstract;
Wouldn't it be also useful to define the operator:
function "/"
(Left : Kilogram;
Right : Kilogram)
return Float_Type;
(where Float_Type is used throughout as a unitless scalar)?
--
Bill Brennan
brennan@netaxs.com
next prev parent reply other threads:[~2002-05-22 22:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-21 10:01 Safe Units Handling in Ada Fraser Wilson
2002-05-21 14:21 ` Pat Rogers
2002-05-21 15:58 ` Stephen Leake
2002-05-22 8:32 ` Fraser
2002-05-22 10:21 ` Fraser
2002-05-22 16:37 ` Stephen Leake
2002-05-23 10:16 ` Fraser
2002-05-23 16:03 ` Stephen Leake
2002-05-22 22:44 ` William C. Brennan [this message]
2002-05-23 8:55 ` Russ
2002-05-23 9:28 ` Fraser
2002-05-23 10:03 ` martin.m.dowie
2002-05-23 10:24 ` Fraser
2002-05-23 11:03 ` martin.m.dowie
2002-05-23 15:57 ` Dan Andreatta
2002-05-23 16:15 ` Fraser Wilson
2002-05-23 16:48 ` martin.m.dowie
2002-05-23 9:04 ` Russ
2002-05-23 10:01 ` Fraser Wilson
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox