Difference between revisions of "Shr"
From Lazarus wiki
Jump to navigationJump to search (New page: '''Sh'''ift '''r'''ight (shr) performs a right bit-shift operation.) |
|||
Line 1: | Line 1: | ||
− | '''Sh'''ift '''r'''ight (shr) performs a right bit-shift operation. | + | '''Sh'''ift '''r'''ight (shr) performs a right bit-shift operation (opposite than [[Shl|shl]]). |
+ | |||
+ | |||
+ | |||
+ | == Is a bit set == | ||
+ | |||
+ | <delphi> | ||
+ | function isBitSet(AValue, ABitNumber:integer):boolean; | ||
+ | begin | ||
+ | result:=odd(AValue shr ABitNumber); | ||
+ | end; | ||
+ | </delphi> | ||
+ | |||
+ | === Read more === | ||
+ | * [[Odd]] | ||
+ | * [[Boolean]] | ||
+ | * [[Const]] | ||
+ | * [[Function]] | ||
+ | * [[Integer]] |