comp.lang.ada
 help / color / mirror / Atom feed
From: mockturtle <framefritti@gmail.com>
Subject: Re: Looking For Simple Routine To Put Integer Into Float
Date: Tue, 25 May 2010 09:34:25 -0700 (PDT)
Date: 2010-05-25T09:34:25-07:00	[thread overview]
Message-ID: <d480ef47-3bfa-490e-bc0d-5c57f80ac9b6@v37g2000vbv.googlegroups.com> (raw)
In-Reply-To: 82typw8zpk.fsf@stephe-leake.org

On May 25, 4:47 am, Stephen Leake <stephen_le...@stephe-leake.org>
wrote:
> ChristopherL <clusard...@aol.com> writes:
> > Can you modify the below code to convert an integer variable of 32
> > bits to a variable of type float.
>
> > A_Float := Float (An_Unknown_Integer);
>
> This answers your question as asked; it converts any integer type to the
> Float type.
>
> Perhaps you want to ask something else?

My theory: maybe the OP wanted to do a "bitwise copy" of the 4 octets
of the Integer into the 4 octets of the Float? Something like an
Unchecked_Conversion?  (This would explain the "Hoping this float is
usually 32 bits" remark)
>
> --
> -- Stephe




      reply	other threads:[~2010-05-25 16:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <570f8963-82ba-42b9-981f-0f92e59161b3@a2g2000prd.googlegroups.com>
2010-05-24 22:53 ` Looking For Simple Routine To Put Integer Into Float Ludovic Brenta
2010-05-24 23:05 ` Jeffrey R. Carter
2010-05-25  2:47 ` Stephen Leake
2010-05-25 16:34   ` mockturtle [this message]
replies disabled

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