Re: Reading Float Data from a binary file into ada



On Jan 30, 4:14 pm, Cesar Rabak <csra...@xxxxxxxxxxxx> wrote:
Niklas Holsti escreveu:
[snipped]



The portability of this approach is the same as for the C code: it
depends on the byte order in the VB file, the order in which you
concatenate the 4 octets into a 32-bit value, and the representation of
Float values. But if it works in C, it should work in Ada, assuming that
the Ada Float type has the same representation as the C float type,
which is likely.

0.01999: since there are not VB implementations on machines other than
Intel, I think once the 'right' endianness is found it will survive all
implementations in Ada, right?

Yes - you are correct. There will only be one windows machine that
this VB app will dump from.

Thanks for the help, I'll be back tomorrow!

.



Relevant Pages

  • Re: Reading Float Data from a binary file into ada
    ... depends on the byte order in the VB file, the order in which you concatenate the 4 octets into a 32-bit value, and the representation of Float values. ... But if it works in C, it should work in Ada, assuming that the Ada Float type has the same representation as the C float type, which is likely. ...
    (comp.lang.ada)
  • Re: Is this expected behavior or not
    ... also talking about turning every slice reference into a loop. ... and a reference to some statically known representation. ... Ada already has "loops" you ... Handle and some plain access type as a parameter. ...
    (comp.lang.ada)
  • Re: Is this expected behavior or not
    ... In Ada 95 only the bodies when all types are same can ... inherit primitive operations without sharing the representation. ... disallow inheritance of the body. ... Such types allow the compiler to chose how they're passed, ...
    (comp.lang.ada)
  • Re: Is this expected behavior or not
    ... That is *independent* on whatever Ada did or not before. ... String is not a multi-method. ... You have the tag in the representation of untagged'Class. ... The whole idea is not to inherit irrelevant representations! ...
    (comp.lang.ada)
  • Re: Is this expected behavior or not
    ... That is *independent* on whatever Ada did or not before. ... *everything* in such a hierarchy is a separate type. ... You have the tag in the representation of untagged'Class. ... You have to be able to inherit ...
    (comp.lang.ada)