[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Determining machine endian-ness
Is there a way to determine whether the machine on which IDL is executing is
big endian or little endian? I am trying to read a data file which I know
contains little-endian data. I need to byte swap this data if IDL is running
on a big-endian machine, but not byte-swap if it is running on a little-endian
machine.
It would be nice there were a field in !VERSION which contained this
information. Right now I am testing if !VERSION.ARCH eq 'x26', 'alpha', etc.
There must be a better way.
____________________________________________________________
Mark Rivers (773) 702-2279 (office)
CARS (773) 702-9951 (secretary)
Univ. of Chicago (773) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars.uchicago.edu (e-mail)
or:
Argonne National Laboratory (630) 252-0422 (office)
Building 434A (630) 252-0405 (lab)
9700 South Cass Avenue (630) 252-1713 (beamline)
Argonne, IL 60439 (630) 252-0443 (FAX)