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

Home » Public Forums » archive » Wrong documentation for BitGet()?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Wrong documentation for BitGet()? [message #93162] Tue, 03 May 2016 10:34 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
Hello,

I was reading the help on the BitGet method,

https://www.harrisgeospatial.com/docs/idl_integer.html#BitGe t

And it seems there is a typo. It says

Print the 3rd bit value of each element of an array:
num = INDGEN(8)
PRINT, num.BitGet( 3 )
IDL prints:
0 0 0 0 1 1 1 1

My experimenting indicates the argument of BitGet is the bit number, starting from zero, not from one as the help indicates. To get the 3rd bit, and obtain the result shown in the example, it seems it should be num.BitGet(2).

Is this correct or am I missing something?

Paulo
[Message index]
 
Read Message
Read Message
Previous Topic: syntax for calling parent class _overloadPlus method
Next Topic: Visualize a Radar image with ENVI

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

Current Time: Wed Oct 08 13:31:47 PDT 2025

Total time taken to generate the page: 0.00427 seconds