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

Home » Public Forums » archive » Re: weird behaviour of ishft
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: weird behaviour of ishft [message #65681 is a reply to message #65679] Tue, 17 March 2009 02:46 Go to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Tue, 17 Mar 2009, BenHur wrote:

> Hi everyone,
>
> Can somebody explain to me, why for certain types ishft shifts only by
> modulo 32 bits?
> Example:
> DISR> print,ishft(1,[31,32])
> 0 1
> DISR> print,!version
> { x86 Win32 Windows Microsoft Windows 6.4 Mar 23 2007 32 64}
>
> I would expect ishft(1,32) = 0. Am I missing something? Is it my
> outdated IDL version or does it happen with newer versions/other
> platforms?
>
> Cheers, Ben
>

It's normal for the right shift (SHR) op on x86 processors. From the Intel
manual: 'The count is masked to 5 bits, which limits the count range to 0
to 31.'

regards,
lajos
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Running bucles on LINUX terminal
Next Topic: Re: Hey! You can execute multi-line statements from the IDL command prompt!

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

Current Time: Thu Oct 16 14:42:27 PDT 2025

Total time taken to generate the page: 1.91905 seconds