Lasso Soft Inc. > Home

[Integer->BitFlip]

[Integer->BitFlip] flips the bit specified in the integer parameter. The bit index should be between 1 and 64.

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

To flip a bit within an integer value:

Use the [Integer->BitFlip] tag. The following example shows the integer 7 (0111) having its 2nd bit flipped leaving 5 (0101).

[Variable: 'Result'=7]
[($Result)->(BitFlip: 2)]
[Variable: 'Result']
Result:
5
Tag Link [Integer->BitFlip] Category Math
Type Member Data Source Any
Support Preferred Version 5.0
Output Type None (Modifies in place) Security None
Implementation LCAPI Sets Lasso 7.0, Lasso 6.0, 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 2014 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft