Promotic
WikipediaLinkedInYoutubeTwitterFacebook

GetBit - method of object Pm

Description:
Getting the bit of the variable.
Syntax:
GetBit(Value As Variant, nIndex As Integer) As Boolean
Calling:
b = Pm.GetBit(Value, nIndex)
Parameters:
Value(Variant) Variable whose bit has to be checked up. The variable must be integer (Byte, Integer, Long).
nIndex(Integer) Index of the bit in the variable (zero-based index).
Return Values:
Return value true is here not -1, but 1, because the experience shows it more practical in this case.
1 - bit is set
0 - bit is not set
Note:
The method can also be called in the graphic item events for Web Panels.

In the JavaScript language, it is better to use the standard bit operators for setting and reading the bit.

Example:
Getting the 20th bit in the BitMask variable
If Pm.GetBit(BitMask, 20) Then
  ... 'An action if the bit is set
End If
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- GetBit
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice