Einzelnen Beitrag anzeigen

Dax
(Gast)

n/a Beiträge
 
#6

Re: bit <---> word

  Alt 16. Nov 2005, 14:54
Ach, ja, ich hab IntToBit vergessen

Delphi-Quellcode:
function IntToBit(Int: Integer): TBitArray {array of Boolean};
var i: Integer;
begin
  SetLength(Result, 32);
  for i := 0 to 31 do
    Result[i] := (Int and (1 shl i)) <> 0;
end;
  Mit Zitat antworten Zitat