Lasso Soft Inc. > Home

[ integer->bitshiftright ]

Method

[Integer->BitShiftRight] shifts the bits in the base integer right by the number specified in the integer parameter. The bit offset should be between 1 and 64.

  • Syntax
Integer Variable->BitShiftRight(Bit Offset)
Examples
  • Beginner

To shift the bits within an integer:

Use the [Integer->BitShiftRight] method. The following example shifts the integer 8 (1000) right by 2 bits, the equivalent of dividing the integer by 4, returning 2.

Code

local(result = 8)
#result->BitShiftRight(2)

Result

2

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