comp.lang.ada
 help / color / mirror / Atom feed
From: dawe@celsius.oz.au (Daniel Wengelin)
Subject: Re: Q: common types?!
Date: 5 Oct 1994 04:40:45 GMT
Date: 1994-10-05T04:40:45+00:00	[thread overview]
Message-ID: <36taod$3o5@brisbane.celsius.oz.au> (raw)
In-Reply-To: 36c1c0$lve@pong.lasc.lockheed.com

Tony Leavitt (tony@deepthought.Sgi.COM) wrote:
: I have a question for all you Ada wizards.  I do not have a lot of experience
: with Ada (only about 3000 lines), and I have begun to start making a common
: types package. This package would define all kinds of types for feet, nautical
: miles, degrees, radians, etc, ad nuasium, for all different kinds and sizes
: of float and integers.  Am I about to go insane by trying this?  Or, does
: this exist already on the Internet somewhere?  If I was to attempt to do this
: how would you recommend about doing it?

Stuff deleted....

: Tony Leavitt

Hi, yes I'd think you'll go nuts trying to handle all the type conversions
necessary. Here's what I think you should do:

Define new basic types, such as integer and float, to facilitate portability.

Define you maths stuff (according to the appropriate standard or annexe)
on your new basic float.

Define your physical units as subtypes, not for type checking, but for better
naming.  subtype Volt ...

Go out and obtain packages for the complex types, such as geodetic positions.
They are pretty tricky to implement if you want a full set of functions.

Just my 2cents...


--------------------------------------------------------------------
--    Daniel Wengelin       -- Team Ada, what a nice idea....     --
--    CelsiusTech           --                                    --
--    dawe@celsiustech.se   --                                    --
--                          --                                    --
--------------------------------------------------------------------
with Standard_Disclaimer;        
--------------------------------------------------------------------




  parent reply	other threads:[~1994-10-05  4:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-09-28 15:16 Q: common types?! Tony Leavitt
1994-09-29 11:37 ` Peter Hermann
1994-09-29 15:35 ` Tucker Taft
1994-10-05  4:40 ` Daniel Wengelin [this message]
1994-10-12 17:39   ` gamache
1994-10-12 20:36     ` Kraig Hanson
1994-10-12 21:37     ` Robert Dewar
replies disabled

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