🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15166

Re: Pascal single to Java float

#15166
From: Steve Schafer (TeamB)
Date: Fri, 02 Jul 1999 00:00
13 lines
1071 bytes
On Thu, 1 Jul 1999 22:39:05 -0500, "David Edson" <edson@lisco.com>
wrote:

>Is there a direct way to convert a 4byte Pascal single to a Java float?
>I've tried various assignments of the bytes, but evidently the bit storage
>is not the same.

The internal format should be the same. What is probably tripping you
up is that the Pascal single is represented in little-endian byte
order, while the Java float is big-endian. So, just reverse the order
of the four bytes and that should be all you have to do.

-Steve
Technical Details
Message-ID: <37914bd0.43896834@90.0.0.40>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7lhc1o$24d9@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,b753bdea2adf68b9
X-Google-Attributes: gidf74b3,public
From: pandeng@telepath.com (Steve Schafer (TeamB))
Subject: Re: Pascal single to Java float
Date: 1999/07/02
Message-ID: <37914bd0.43896834@90.0.0.40>
X-Deja-AN: 496298616
Content-Transfer-Encoding: 7bit
References: <7lhc1o$24d9@forums.borland.com>
Content-Type: text/plain; charset=us-ascii
Organization: TeamB
Mime-Version: 1.0
Reply-To: pandeng@telepath.com
Newsgroups: borland.public.jbuilder.java.language