comp.lang.ada
 help / color / mirror / Atom feed
From: kst@aonix.com (Keith Thompson)
Subject: Re: How to convert an Fixed_Point to to an Integer ?
Date: 1996/12/26
Date: 1996-12-26T00:00:00+00:00	[thread overview]
Message-ID: <E30JFv.LsI@thomsoft.com> (raw)
In-Reply-To: dewar.851480526@merv


In <dewar.851480526@merv> dewar@merv.cs.nyu.edu (Robert Dewar) writes:
> True enough, of course in all GNAT compilers, Duration has a vrey large
> range (it is 64 bit signed in units of nanoseconds). I wonder whether
> there really will be Ada 95 compilers with narrow ranges ....

Yes, under ObjectAda the range of type Duration is about +/-131072.0.
(It's a 32-bit type.)

> So a truly portable solution would have to use a loop ...

Actually, a truly portable solution could just use an algorithm to
compute the number of days between two given dates and then account for
the seconds.  It's a bit more complicated than it should need to be,
but there's no portability problem.

-- 
Keith Thompson (The_Other_Keith) kst@aonix.com <http://www.aonix.com> <*>
TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2706
"SPOON!" -- The Tick




  reply	other threads:[~1996-12-26  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-22  0:00 How to convert an Fixed_Point to to an Integer ? Jerry van Dijk
1996-12-23  0:00 ` Larry Kilgallen
1996-12-23  0:00   ` Robert Dewar
1996-12-24  0:00     ` Jerry van Dijk
1996-12-24  0:00       ` Robert Dewar
1996-12-24  0:00         ` Norman H. Cohen
1996-12-24  0:00           ` Robert Dewar
1996-12-26  0:00             ` Keith Thompson [this message]
1996-12-26  0:00               ` Robert Dewar
1996-12-25  0:00         ` Jerry van Dijk
1996-12-25  0:00           ` Robert Dewar
1996-12-26  0:00             ` Norman H. Cohen
1996-12-27  0:00               ` Jerry van Dijk
1996-12-27  0:00                 ` Leap seconds in Unix time (was: Re: How to convert an Fixed_Point to to an Integer ?) Norman H. Cohen
1996-12-30  0:00               ` How to convert an Fixed_Point to to an Integer ? Mike Young
1996-12-30  0:00                 ` 2000 is a leap year (was: How to convert an Fixed_Point to to an Inte) Larry Kilgallen
1996-12-30  0:00                 ` How to convert an Fixed_Point to to an Integer ? Michael F Brenner
1996-12-31  0:00                 ` Keith Thompson
1997-01-02  0:00             ` 2000 is a leap year (was: How to convert an Fixed_Point to to an Inte) Mike Paley
1996-12-23  0:00 ` How to convert an Fixed_Point to to an Integer ? Eric Miller
1996-12-23  0:00 ` Jerry van Dijk
1996-12-30  0:00 ` Steve Jones - JON
1996-12-30  0:00 ` Dave Barnes
1996-12-30  0:00 ` Steve Jones - JON
1996-12-30  0:00   ` Jacques Rouillard
replies disabled

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