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 #44032 is a reply to message #44031] Wed, 11 May 2005 10:12 Go to previous messageGo to previous message
K. Bowman is currently offline  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
[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: Sat Oct 11 15:10:11 PDT 2025

Total time taken to generate the page: 2.24027 seconds