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

Home » Public Forums » archive » Re: Endian-ness
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: Endian-ness [message #29444 is a reply to message #29307] Wed, 20 February 2002 11:48 Go to previous message
george.mccabe is currently offline  george.mccabe
Messages: 10
Registered: October 2001
Junior Member
jonathan,

i don't know how asthetically pleasing, but in my systems i enclude
the following lines in the IDL setup session batch procedure -

; big_endian platform?
a=1 & b=a & byteorder,a,/swap_if_little
DEFSYSV, '!BIGENDIAN', (a eq b), 1


i do like the (global) system variable approach for things such as
this,
george

Jonathan Joseph <jj21@cornell.edu> wrote in message news:<3C67E04E.998AD84C@cornell.edu>...
> Thank you David and Liam,
>
> Liam's result seems more aesthetically pleasing (no offense David).
> Unfortunately, I don't think I can use the swap_if_big_endian and
> swap_if_little_endian keywords to OPEN, because whether I swap or
> not depends on BOTH the hardware and the file. I have no a-priori
> knowledge of the endian-ness of the file until I've already
> opened it. Although, I guess I could open the file, figure out
> what it is, close it and then re-open it. The file has a text header
> (impervious to byte-order issues) that will indicate the endian-ness
> of the file, followed by binary data.
>
> Am I correct in assuming that Liam's functions don't need to be
> specifically cast to Long? In other words,
>
> byte(1,0) would yield the same result as byte(1L, 0L)
>
> Thanks.
>
> -Jonathan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Chinese characters?
Next Topic: Re: Help! Slow object graphics.

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

Current Time: Wed Oct 08 18:38:41 PDT 2025

Total time taken to generate the page: 0.00417 seconds