comp.lang.ada
 help / color / mirror / Atom feed
From: "Martin Dowie" <martin.dowie@btopenworld.com>
Subject: Re: Why no 'Floor for fixed point types
Date: Thu, 23 Oct 2003 23:10:45 +0000 (UTC)
Date: 2003-10-23T23:10:45+00:00	[thread overview]
Message-ID: <bn9n5k$8sc$1@titan.btinternet.com> (raw)
In-Reply-To: mailman.194.1066939697.25614.comp.lang.ada@ada-france.org

"Duncan Sands" <baldrick@free.fr> wrote in message
news:mailman.194.1066939697.25614.comp.lang.ada@ada-france.org...
> I think the subject says it all.  Just curious.

It only makes sense to convert to a float then to an integer - what
if there is no fixed point value that has the same magnitude as an
integer value? It is annoying though, when in 'real life' you don't
really care about the middle conversion, e.g.

My_Int := My_Int_Type (My_Float_Type'Floor (My_Fixed_Type'(1.5)));

My_Int should be 1.

I've just been throew this one myself and if you think long
and hard you will see the logic :-)





  parent reply	other threads:[~2003-10-23 23:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-23 20:09 Why no 'Floor for fixed point types Duncan Sands
2003-10-23 22:06 ` Robert I. Eachus
2003-10-24 16:00   ` Stephen Leake
2003-10-24 18:13     ` Duncan Sands
2003-10-23 23:10 ` Martin Dowie [this message]
2003-10-24 21:46 ` Nick Roberts
2003-10-25  4:29   ` Robert I. Eachus
2003-10-25 20:42     ` Nick Roberts
2003-10-25 22:40       ` Robert I. Eachus
2003-10-27 18:59         ` Randy Brukardt
2003-10-28  1:19           ` Robert I. Eachus
2003-10-28 18:23             ` Nick Roberts
2003-10-28 18:34               ` Stephane Richard
2003-10-29 19:26               ` Randy Brukardt
2003-10-30  4:55                 ` Robert I. Eachus
2003-10-28 18:10         ` Nick Roberts
2003-10-27 18:49       ` Randy Brukardt
2003-10-28 18:32         ` Nick Roberts
2003-10-29 19:29           ` Randy Brukardt
2003-10-30 23:41             ` Nick Roberts
2003-10-31 22:25               ` Randy Brukardt
2003-11-06  2:41                 ` Nick Roberts
replies disabled

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