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

Home » Public Forums » archive » Re: Possible Mac OS Bug with FIX.
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: Possible Mac OS Bug with FIX. [message #44029 is a reply to message #44028] Wed, 11 May 2005 11:31 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
=?ISO-8859-2?Q?F=F6ldy_Lajos?= writes:

> my guess is that the two fix() calls do different things:
>
> - fix(tmp[15]) does convert a 1-byte integer to a 2-byte integer, using
> a conversion instruction in the CPU. The result is the same on all
> architectures.
>
> - fix(tmp, 15) does read memory from the address of tmp[15] as a 2-byte
> integer. No conversion instruction is used, only write (as type A) and
> read (as type B). It is the good old EQUIVALENCE statement from Fortran,
> and is architecture-dependent. Perhaps this should be mentioned in the
> IDL docs :-)

Well, as I say, I understand the problem (and can even
appreciate it), but what I am after is consistency. So,
how architecture-dependent *is* it? Does the same thing
happen on Linux machines? I'm just trying to get a feel
for when I should put the fix in. :-)

One of my sources points out that the procedure
SWAP_ENDIAN_INPLACE is useful, with one of the SWAP_IF_****
keywords is used. I just want to know if I have to use
it only on Macs, or on UNIX machines, or when!?

Is a Macintosh a big or little endian machine?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[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
Previous Topic: Using IDL variables from ENVI
Next Topic: Widget_Draw scrollebe but not scrollable ??

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

Current Time: Sun Oct 12 12:12:21 PDT 2025

Total time taken to generate the page: 1.75712 seconds