Lasso Soft Inc. > Home

[ integer->bitand ]

Method

[Integer->BitAnd] performs a bitwise AND operation between each bit in the base integer and the integer parameter.

Returns the result and leaves the integer left side unmodified.

  • Syntax
variable->BitAnd(Integer Value)
Examples
  • Beginner

To combine two integers using a bitwise AND operation:

Use the [Integer->BitAnd] method. The following example shows the result of performing a bitwise AND operation on 14 (1110) and 13 (1101), resulting in 12 (1100).

Code

local(test = 14)
'Result = '
#test->BitAnd(13)
'\r'
'Test = '+#test

Result

Result = 12
Test = 14

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