Re: Reading Float Data from a binary file into ada
- From: Robert A Duff <bobduff@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Jan 2007 15:51:42 -0500
"frikk" <frikker@xxxxxxxxx> writes:
I've been working with ada for awhile, but I'm still not very good at
the syntaxes of more complicated data management commands. How does
ada store its floating point data? Is it stored like an ieee standard?
Ada and C are the same in this regard -- Ada and C compilers will
typically store Floats in the way the hardware normally stores them,
which is IEEE on many machines. Of course, neither language standard
requires any particular representation, but it's usually safe to trust
that C float and Ada Float are represented the same way on the same
machine.
The VB format you mentioned doesn't sound like IEEE float, but anyway,
if you want to write an Ada algorithm that mimics the C one, you should
use Unchecked_Conversion to do the "cast" from array-of-4-bytes to
Float, if that's what it does.
- Bob
.
- References:
- Reading Float Data from a binary file into ada
- From: frikk
- Re: Reading Float Data from a binary file into ada
- From: Jeffrey R. Carter
- Re: Reading Float Data from a binary file into ada
- From: frikk
- Reading Float Data from a binary file into ada
- Prev by Date: Re: Wasteful internationalization
- Next by Date: Re: How come Ada isn't more popular?
- Previous by thread: Re: Reading Float Data from a binary file into ada
- Next by thread: Re: Reading Float Data from a binary file into ada
- Index(es):
Relevant Pages
|