Warning

You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
rshift [2019/09/03 08:48] – created neilsrshift [2021/01/02 07:53] (current) neils
Line 5: Line 5:
 Syntax: Syntax:
  
-  rshift(<byte or int expression> [, <byte positions>])+  rshift!(<byte expression> [, <byte positions>]) 
 +or 
 +  rshift(<int expression> [, <byte positions>])
      
 The ''RSHIFT()'' function shifts each bit in //expression// to the right by the number of //positions// and returns the result of the operation. The ''RSHIFT()'' function shifts each bit in //expression// to the right by the number of //positions// and returns the result of the operation.
  
 The second argument can be omitted and it defaults to 1. The second argument can be omitted and it defaults to 1.
 +
 +Warning: passing //positions// bigger than 127 will lead to undefined results.
  
 ===== Performance tip ===== ===== Performance tip =====