Re: Reading Float Data from a binary file into ada



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?
.



Relevant Pages

  • Re: Reading Float Data from a binary file into ada
    ... the Ada Float type has the same representation as the C float type, ... There will only be one windows machine that ...
    (comp.lang.ada)
  • Re: Ada decimal types
    ... The representation of the multiples of small can be anything that the ... It is possible for a compiler to reject specifying a small of 1.0e-6. ... Ada 83 compilers used to reject these because ...
    (comp.lang.ada)
  • Re: ANN: ASIS2XML 20041024a
    ... >> this is the Right Thing for an XML representation). ... All important UML tool can import XMI. ... higher than that of an Ada program. ...
    (comp.lang.ada)
  • Re: Enumeration representation enhancement proposal
    ... representation has no impact on comparison. ... Is not correct Ada. ... that of the original declaration of the enumeration. ... the order rule for enumeration representations. ...
    (comp.lang.ada)
  • Re: Avatox 1.0: Trouble with encoding in Windows
    ... representation (which is not defined by Ada anyway) is probably broken. ... Wide_Wide_String are defined in terms of Unicode. ... returning it in a particular Unicode encoding. ...
    (comp.lang.ada)