comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: little and big endian -- once more
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: little and big endian -- once more [message #15338 is a reply to message #15329] Wed, 12 May 1999 00:00 Go to previous messageGo to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
David Fanning wrote:
>
> Martin Schultz (mgs@io.harvard.edu) writes:
>
> [...]
>
> Here is a little function, Martin, that will make sure
> your code works without having to track every machine
> architecture down. Found it on my web page. :-)
>
> Cheers,
>
> David


well, that's not all you need. Of course I replaced my string('x86')
thing with the inline code of little_endian() and at first it seemed to
work fine. But I encountered one situation when the SWAP_IF keyword
would not detect things properly which is reading data from a mounted
network drive with different endian (i.e. a generic unix drive mounted
to a linux box). So, I guess, I should give Liam's suggestion a try.
Unfortunately, it seems that you must know what's in the file in order
to test it, but that's probably a good idea anyway when you are dealing
with binary files ;-) Just for clarification: is it true that the endian
matters for integers as well as floats?

Thanks again,
Martin.



--

|||||||||||||||\\\\\\\\\\\\\-------------------///////////// //|||||||||||||||
Martin Schultz, DEAS, Harvard University, 29 Oxford St., Pierce 109,
Cambridge, MA 02138 phone (617) 496 8318 fax (617) 495 4551
e-mail mgs@io.harvard.edu web http://www-as/people/staff/mgs/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: coherence test implementation
Next Topic: Re: Making an array of structures containing pointers

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 23:22:34 PDT 2025

Total time taken to generate the page: 0.87881 seconds