Bin -> Dec

function BinToInt(const Value: string): Integer;
{©Drkb v.3(2007): www.drkb.ru}
var
 i, strLen: Integer;
begin
 Result := 0;
 strLen := Length(Value);
 for i := 1 to strLen do
  if Value[i] = '1' then
  Result := Result or (1 shl (strLen - i))
  else
  Result := Result and not (1 shl (strLen - i));
end;
Автор: Yanis Взято с Vingrad.ru http://forum.vingrad.ru

Отправить комментарий

Проверка
Антиспам проверка
Image CAPTCHA
...