Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Byte format of "single" data type

Posted on 2001-08-10
4
Medium Priority
?
245 Views
Last Modified: 2010-04-06
Can anyone explain the byte format (4 bytes) of the Delphi "single" floating point data type.
I have a Delphi app that writes "single" data type values to a file and I would like to read the data file using a non-Delphi app.
0
Comment
Question by:zebada
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 14

Accepted Solution

by:
AvonWyss earned 400 total points
ID: 6371951
It's the normal IEEE standard single data type.
http://www.psc.edu/general/software/packages/ieee/ieee.html
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6371995
Hi zebada,

It's really standard type. E.g. it used in 80287 coprocessor.
31 bit - Sign
30...23 Exponent
22...0 Fracation

If you are going to load it to application that  builded with compiller supported "Single type", then just load it directly to variable.

-----
Igor
0
 
LVL 6

Author Comment

by:zebada
ID: 6372026
Thanks to all,

AvonWyss was first. I should've known but I was using "Hex Editor" with the byte order accidentally set to Motorola instead of Intel. So I was seeing really strange numbers when it was interpreting the 4-byte single values. I concluded (incorrectly) that Delphi was using non-standard floating point formats. DOH!

Cheers
Paul
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question