Re: Possible Mac OS Bug with FIX. [message #44032 is a reply to message #44031] |
Wed, 11 May 2005 10:12   |
K. Bowman
Messages: 330 Registered: May 2000
|
Senior Member |
|
|
In article <MPG.1cebe581b001a48e9899fc@news.frii.com>,
David Fanning <davidf@dfanning.com> 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
I think perhaps you want fix(tmp, 14)?
IDL> tmp = bytarr(20)
IDL> tmp[15] = 5
IDL> print, fix(tmp[15])
5
IDL> print, fix(tmp, 14)
5
I think it is not a question of endianess, but of "which 2 bytes belong to the
2-byte integer".
Ken
|
|
|