Re: Possible Mac OS Bug with FIX. [message #44033 is a reply to message #44032] |
Wed, 11 May 2005 10:04  |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
Hi David,
I guess this is an endianness thing. You are converting the 5 0 byte
sequence to a 2-byte integer. It can be 5*256+0 (1280) or 5+0*256 (5)
depending on the host endianness.
regards,
lajos
On Wed, 11 May 2005, David Fanning wrote:
> Folks,
>
> I have a report of a possible bug this morning with the Mac OS
> operating system. It seems that the FIX function, when used with
> the offset parameter does not produce reliable values.
>
> Here is an example:
>
> tmp=bytarr(20)
> tmp[15]=5
> print, fix(tmp[15]), fix(tmp,15)
> 5 1280
>
> Can anyone confirm that this is or is not a problem in
> IDL 6.1 on the Mac OS operating system?
>
> Thanks,
>
> David
>
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>
|
|
|