把二进制消息转换为十六进制字符串,以便显示。type function Frame2Hex(const Frame: string): string; function Frame2Hex(const Frame: array of Byte): string;...implementation...function Frame2Hex(const Frame: string): string; var i: Integer; begin Result := ''; for i:=1 to Length(Frame) do Result := Result + IntToHex(Byte(Frame[i]), 2) + ' '; end;function Frame2Hex(const Frame: array of Byte): string; var i: Integer; begin Result := ''; for i:=0 to High(Frame) do Result := Result + IntToHex(Frame[i], 2) + ' '; end;
把二进制消息转换为十六进制字符串,以便显示。type function Frame2Hex(const Frame: string): string; overload; function Frame2Hex(const Frame: array of Byte): string; overload;...implementation...function Frame2Hex(const Frame: string): string; var i: Integer; begin Result := ''; for i:=1 to Length(Frame) do Result := Result + IntToHex(Byte(Frame[i]), 2) + ' '; end;function Frame2Hex(const Frame: array of Byte): string; var i: Integer; begin Result := ''; for i:=0 to High(Frame) do Result := Result + IntToHex(Frame[i], 2) + ' '; end;
function Frame2Hex(const Frame: string): string;
function Frame2Hex(const Frame: array of Byte): string;...implementation...function Frame2Hex(const Frame: string): string;
var
i: Integer;
begin
Result := '';
for i:=1 to Length(Frame) do
Result := Result + IntToHex(Byte(Frame[i]), 2) + ' ';
end;function Frame2Hex(const Frame: array of Byte): string;
var
i: Integer;
begin
Result := '';
for i:=0 to High(Frame) do
Result := Result + IntToHex(Frame[i], 2) + ' ';
end;
function Frame2Hex(const Frame: string): string; overload;
function Frame2Hex(const Frame: array of Byte): string; overload;...implementation...function Frame2Hex(const Frame: string): string;
var
i: Integer;
begin
Result := '';
for i:=1 to Length(Frame) do
Result := Result + IntToHex(Byte(Frame[i]), 2) + ' ';
end;function Frame2Hex(const Frame: array of Byte): string;
var
i: Integer;
begin
Result := '';
for i:=0 to High(Frame) do
Result := Result + IntToHex(Frame[i], 2) + ' ';
end;
http://community.csdn.net/Expert/topic/3846/3846408.xml?temp=.6689569使用控件:TServerSocket