Lasso Soft Inc. > Home

[ Integer->BitSet ]

Method

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

Returns the result leaving the left side source variable unmodified.

  • Syntax
Integer Variable->BitSet(Bit Index)
Examples
  • Beginner

To set a bit in an integer value:

Use the [Integer->BitSet] method. The following example shows the integer 7 (0111) having its upper bit set leaving 15 (1111).

Code

local(test = 7)
'Result = '
#test->BitSet(4)
'\r'
'Test = '+#test

Result

Result = 15
Test = 7

Recent Comments

No Comments found

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