Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.0.0 / tests / test / jvm / getbit.pp
Size: Mime:
program getbit;

{$mode delphi}

type
  plint = class
    digits: array of byte;
  end;

function LGetBit(A: PLInt; Bit: Cardinal): Integer;
begin
  Result := (A.Digits[(Bit - 1) shr 5 + 1] shr ((Bit - 1) and $1F{(Bit - 1) mod 32})) and 1;
end;

var
  p: plint;
begin
  p:=plint.create;
  setlength(p.digits,10);
  lgetbit(p,4);
end.