comp.lang.ada
 help / color / mirror / Atom feed
From: brennan@corsair.warm.inmet.com (William Brennan)
Subject: Re: Types with physical dimension
Date: Wed, 28 Sep 1994 17:36:19 GMT
Date: 1994-09-28T17:36:19+00:00	[thread overview]
Message-ID: <CwuowK.73G@inmet.camb.inmet.com> (raw)
In-Reply-To: GRAHAM.94Sep27181841@canopus.clsi.com

In article <GRAHAM.94Sep27181841@canopus.clsi.com>,
Paul Graham <graham@clsi.COM> wrote:
>
>One can model physical types in Ada by using private types, but this
>involves writing a lot of operators.  What do Ada programmers do to guard
>against dimensional errors?
>

Ummm... I did it by using private types and writing a lot of operators.

Yes, it's a bit unwieldy.  But once it's done, it's done. Well, not really.  
If you want to create subtypes to have automatic constraint checking performed, 
you have to modify the package to add subtype definitions which I don't like 
too much.  It would be best if the package remained totally stable, and
subtypes could be added without surgery.  Ada 9X may fix this with child units, 
but it doesn't do much for us living with Ada 83.

If anyone wants to see an example of what I've got so far, please send me 
e-mail.  These packages are still a work in progress, being done in my spare 
time.  
-- 
----------------------------------------------------------------------------
                                                     === Team-Ada member ===
Bill Brennan                                  brennan@panther.warm.inmet.com



       reply	other threads:[~1994-09-28 17:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <GRAHAM.94Sep27181841@canopus.clsi.com>
1994-09-28 17:36 ` William Brennan [this message]
1994-09-28 21:41 ` Types with physical dimension Tucker Taft
1994-09-29  4:11   ` Robert Dewar
1994-09-29 11:19     ` Peter Hermann
1994-09-30 10:17       ` Dr John Stockton
1994-10-03  4:37       ` Robert Dewar
1994-09-29 13:37     ` Tucker Taft
1994-10-03  4:40       ` Robert Dewar
1994-09-28 19:28 Paul Pukite
  -- strict thread matches above, loose matches on Subject: below --
1994-09-28 10:55 Simtel20 Transfer
1994-09-28 18:56 ` Mark A Biggar
1994-10-04  2:06 ` lmiller
1994-09-27 22:18 Paul Graham
1994-09-28 13:59 ` Robert Dewar
1994-09-30  2:06   ` R_Tim_Coslet
1994-10-03 17:31 ` Stephen A. Leake
1994-10-04 11:51   ` Robert I. Eachus
1994-10-04 19:45     ` Mark A Biggar
     [not found]       ` <CxBBx8.7L@irvine.com>
1994-10-13 22:15         ` gamache
1994-10-12  3:43     ` Matt Kennel
1994-10-04 14:56   ` Robert Dewar
1994-10-05 14:53     ` Bob Gilbert
1994-10-05  8:38   ` Jean-Pierre Rosen
1994-10-05 10:35     ` Stephen J Bevan
1994-10-05 13:17       ` Jean-Pierre Rosen
1994-10-05 15:48     ` Norman H. Cohen
replies disabled

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