CnPack Forum

#1 请教大家一个问题，不好描述，看看源码说话吧
[size=3]function IntToBin(Value: Byte): string;overload;
var
i: Integer;
begin
SetLength(result, 8);
for i := 1 to 8 do
begin
if ((Value shl (i - 1)) shr 7) = 0 then
result[ i ] := '0'
else
result[ i ] := '1';
end;
end;

function IntToBin(Value: Byte): string;overload;
var
i: Integer;
tmpByte : Byte;
begin
SetLength(result, 8);
for i := 1 to 8 do
begin
tmpByte := Value shl (i - 1);
tmpByte := tmpByte shr 7;
if tmpBy ..

#1 >>Next Page

Forum:技术板块灌水区 ...
Thread:请教大家一个问题，不好 ...
Next Thread:现在大家用什么版本呢 ...

Home
Login

Powered by Discuz!