Update cookies preferences
Promotic

GetBit - method of the Pm object

Description:
Returns a value of the variable bit.
Syntax:
Boolean GetBit(Variant Value, Long nIndex)
Parameters:
Value(Variant) The value whose bit has to be checked up. This value must be integer (Byte, Integer, Long).
nIndex(Long) Index of the bit in the variable (zero-based index).
Return value:
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:
In the JavaScript language, it is better to use the standard bit operators for reading and setting the bit.

This method is functional also in Macro expression $.expr and in the onDraw event of the PmgCanvas object.
This method is also functional in Web panels.
Example:
Detects the value of the bit 20 in the BitMask variable
JavaScriptVBScriptSelect and copy to clipboard

if (Pm.GetBit(BitMask, 20))
{
// ... An action if the bit is set
}

History:
Pm8.02.09: Available for Web panels.
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- GetBit
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r.o.