From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,a34155c47adc46f2 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!v37g2000vbv.googlegroups.com!not-for-mail From: mockturtle Newsgroups: comp.lang.ada Subject: Re: Looking For Simple Routine To Put Integer Into Float Date: Tue, 25 May 2010 09:34:25 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <570f8963-82ba-42b9-981f-0f92e59161b3@a2g2000prd.googlegroups.com> <82typw8zpk.fsf@stephe-leake.org> NNTP-Posting-Host: 93.37.250.71 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1274805265 15519 127.0.0.1 (25 May 2010 16:34:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 25 May 2010 16:34:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v37g2000vbv.googlegroups.com; posting-host=93.37.250.71; posting-account=9fwclgkAAAD6oQ5usUYhee1l39geVY99 User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.2.15 Version/10.10,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:11967 Date: 2010-05-25T09:34:25-07:00 List-Id: On May 25, 4:47=A0am, Stephen Leake wrote: > ChristopherL writes: > > Can you modify the below code to convert an integer variable of 32 > > bits to a variable of type float. > > > A_Float :=3D 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