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

Home » Public Forums » archive » Re: Way to determine big/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: Way to determine big/little endian? [message #26663 is a reply to message #26661] Wed, 19 September 2001 21:36 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mark Rivers (rivers@cars.uchicago.edu) writes:

> Is there a built-in way to determine if the machine IDL is running on is
> big-endian or little-endian? I

Here is an article on the subject, with a little snippet
of code to tell you where you are.

http://www.dfanning.com/tips/endian_machines.html

The code looks like this:

little_endian = (BYTE(1, 0, 1))[0]
IF (little_endian) THEN $
Print, "I'm little endian." ELSE $
Print, "I'm big endian."

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
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
Previous Topic: PV-WAVE Device Copy Memory Bug in WinNT
Next Topic: Re: wait loop

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

Current Time: Sat Oct 11 00:42:29 PDT 2025

Total time taken to generate the page: 0.80259 seconds