大神们好 能问个问题吗
Src:array [0..11] of Byte;
Src里存了12个数字
怎么把Src里的数字一个个转换成二进制赋值给一个个的string吗
string str0=src【0】的二进制
string str1=src【1】的二进制
。
。
。
Src:array [0..11] of Byte;
Src里存了12个数字
怎么把Src里的数字一个个转换成二进制赋值给一个个的string吗
string str0=src【0】的二进制
string str1=src【1】的二进制
。
。
。
解决方案 »
- 求 DrawReversibleFrame 简单用例
- 关于对TComboBox赋值碰到的一个奇怪问题
- 新手上路,关于csv(excel文件)类型的读数据问题,能否使用F1BOOK控件,请高手指教,谢谢!
- 'oookkk' come in only !
- 深夜了,在线等待!!!很急!!!!!!!!
- Item cannot be found in the collection corresponding to the requested name or ordinal.
- 如何避免Label闪烁问题
- delphi 注入进程的dll 如何调用另一个dll
- 超级难题????????????????
- CodeRush是做什么用的东东???
- 一次滑稽的解决过程
- 合并单元格
function ByteToBitStr(Value: Byte): String;
var
I: Byte;
begin
Result := '00000000';
if Value <> 0 then
begin
for I := 8 downto 1 do
begin
if (Value and 1) = 1 then
Result[I] := '1'
else
Result[I] := '0';
Value := (Value shr 1);
end;
end;
end;
var
lStr: AnsiString;
lBytes: Array[0..11] of Byte;
lIndex, lSI: Integer;
begin
lBytes[3] := 66;
lBytes[1] := 2;
lBytes[9] := 89;
SetLength(lStr, Length(lBytes) * 2);
lSI := 1;
for lIndex := Low(LBytes) to High(lBytes) do
begin
Move(AnsiString(IntToHex(lBytes[lIndex]))[1], lStr[lSI], 2);
Inc(lSI, 2);
end; ShowMessage(lStr);
end;