Solved

Byte format of "single" data type

Posted on 2001-08-10
4
235 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
4 Comments
 
LVL 14

Accepted Solution

by:
AvonWyss earned 100 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 22

Expert Comment

by:Mohammed Nasman
ID: 6371993
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now