Difference between revisions of "Shr"

From Lazarus wiki
Jump to navigationJump to search
m (Text replace - "delphi>" to "syntaxhighlight>")
Line 18: Line 18:
 
* [[Function]]
 
* [[Function]]
 
* [[Integer]]
 
* [[Integer]]
 +
 +
[[Category:Pascal]]

Revision as of 21:18, 27 April 2013

Shift right (shr) performs a right bit-shift operation (opposite than shl).


Is a bit set

function isBitSet(AValue, ABitNumber:integer):boolean;
begin
   result:=odd(AValue shr ABitNumber);
end;

Read more