Re: Reading Float Data from a binary file into ada



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
.



Relevant Pages

  • Re: Converting 4 bytes to a float
    ... then convert that into a float that I can use for arithmetic. ... Are you reading a text string ... The union does give me the correct result. ... A union uses the same memory for all of ...
    (comp.lang.perl.misc)
  • Re: Converting 4 bytes to a float
    ... then convert that into a float that I can use for arithmetic. ... the incorrect use of a union above, and assuming you have the string ... A union uses the same memory for all of ... Web Hosting by West Virginians, ...
    (comp.lang.perl.misc)
  • Re: union
    ... You can only store one value in a union. ... current value is a float value. ... known as a struct: ...
    (comp.lang.c)
  • Re: Extremely wierd problem I just cannot explain...works in debug, does not work in release.
    ... a float or double should be used to store _only_ measured ... kimi no koto omoidasu hi nante nai no wa ... kimi no koto wasureta toki ga nai kara ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Reading Float Data from a binary file into ada
    ... but store it into a 32 bit Float. ... Any reason you can't call this C function from Ada? ... a round about syntax to help me get started in setting up the memory ...
    (comp.lang.ada)