Shr

From Lazarus wiki
Revision as of 22:17, 8 November 2007 by Djzepi (talk | contribs)
Jump to navigationJump to search

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


Is a bit set

<delphi> function isBitSet(AValue, ABitNumber:integer):boolean; begin

  result:=odd(AValue shr ABitNumber);

end; </delphi>

Read more