Lasso Soft Inc. > Home

[Integer->BitTest]

[Integer->BitTest] returns True if the bit specified in the integer parameter is 1 or False otherwise. The bit index should be between 1 and 64.

  • Syntax
  • Parameters
[Integer Variable->(BitTest: Bit Index)]
Required Parameters
Integer Variable The integer value which should be operated upon.
Bit Index The index of the bit which is to be inspected.
Examples

To test a bit from an integer value:

Use the [Integer->BitTest] tag. The following example shows a test of bit 3 on the integer 7 (0111) which returns True.

[Variable: 'Result'=7]
[Output: ($Result)->(BitTest: 3)]
Result:
True
Tag Link [Integer->BitTest] Category Math
Type Member Data Source Any
Support Preferred Version 5.0
Output Type Boolean Security None
Implementation Sets Lasso 5.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft