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

Home » Public Forums » archive » Re: Fortran unformatted data: Big or little endian
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: Fortran unformatted data: Big or little endian [message #34947 is a reply to message #34946] Wed, 30 April 2003 13:31 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mark Hadfield (m.hadfield@niwa.co.nz) writes:

> If you have a reasonably recent version of IDL (>= 5.4??) and you know
> the byte-order of the machine on which you're *reading* the data then
> you can use OPEN's SWAP_IF_BIG_ENDIAN or SWAP_IF_LITTLE_ENDIAN
> keywords. Here's the documentation entry for the former:
>
> SWAP_IF_BIG_ENDIAN
>
> Setting this keyword is equivalent to setting SWAP_ENDIAN; it only
> takes effect if the current system has big endian byte
> ordering. This keyword does not refer to the byte ordering of the
> input data, but to the computer hardware.

The problem seems to be that the guy doesn't know
the ordering of the INPUT data. Like always, if you
don't know what it is you are reading, you are in
for a bit of bother (to paraphrase Whinnie the Pooh).

Maybe he will get lucky. It happens. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fortran unformatted data: Big or little endian
Next Topic: Re: WIDGET_TEXT - HOW TO NOT CHANGE VALUE OF TEXT WHILE EDITING FIELD?

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

Current Time: Sat Oct 11 17:21:49 PDT 2025

Total time taken to generate the page: 0.00369 seconds