BIN → Byte

Материал из DRKB

BIN --> Byte[править | править код]

function BinStrToByte(a_sBinStr: string): byte;
var
  i: Integer;
begin
  Result := 0;
  for i := 1 to Length(a_sBinStr) do
    Result := (Result shl 1) or Byte(a_sBinStr[i] = '1');
end;


Source: http://delphiworld.narod.ru/
ID: 00944