Re: Reading Float Data from a binary file into ada
- From: "frikk" <frikker@xxxxxxxxx>
- Date: 30 Jan 2007 10:04:10 -0800
On Jan 30, 12:56 pm, "Jeffrey R. Carter" <jrcar...@xxxxxxx> wrote:
frikk wrote:
Basically I need to be able to read in the binary data byte by byte
but store it into a 32 bit Float. The C union example above uses the
same memory address for the Float as it does for the size 4 char
array. I don't even know if the VB dump will correspond with the way
ada handles floats or not, but I'll worry about that later.
Any reason you can't call this C function from Ada?
--
Jeff Carter
"I soiled my armor, I was so scared."
Monty Python & the Holy Grail
71
Thank you for the responses so far.
We are using simulink and calling ada through s-functions. If we use
C, we'd have to get the data back to the matlab workspace, then pass
it into an ada module. It is prefered to keep all of the data inside
the ada modules without coming back to the workspace.
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?
And yes - it appears that the data dumped is not actually a float but
fixed point. This is how VB apparently handles 'Float' data types.
If I had data in a binary file, even disregarding the fractional
piece, how could I get this into an ada variable? If I could even get
a round about syntax to help me get started in setting up the memory
locations and such that would be helpful. Its hard to find specific
examples sometimes.
Thanks!
Blaine
.
- Follow-Ups:
- 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: Robert A Duff
- Re: Reading Float Data from a binary file into ada
- From: frikk
- Re: Reading Float Data from a binary file into ada
- 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
- Reading Float Data from a binary file into ada
- Prev by Date: Re: Reading Float Data from a binary file into ada
- Next by Date: Re: Ravenscar - program termination
- 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
|
Loading