K
kenxy
Unregistered / Unconfirmed
GUEST, unregistred user!
情况如下:
s1char;
s2:string;
转换前:
s1所指向的内容为:'68A400006860316800111168A128111111E9DC7432222222220100010000000000000000000001000000030000000200006000800008D116BD16'
经以下语句转换后:
s2:=string(s1);
或s2=s1;
或s2:=strpas(s1);
结果变s2内容变为:'68A400006860316800111168A1281111'#0#0'E9DC7432222222220100010000000000000000000001000000030000000200006000800008D116BD16'
在一个dll工程中,相关代码如下:
var
tx,rxchar;
tempstr,str1:string;
begin
.............
tx:='68A00000689001313216';
SendHex(port,tx,rx);
rx:='68A400006860316800111168A128111111E9DC7432222222220100010000000000000000000001000000030000000200006000800008D116BD16';
tempstr:=string(rx);
...................
搞不清楚啥原因,望高人指点!
s1char;
s2:string;
转换前:
s1所指向的内容为:'68A400006860316800111168A128111111E9DC7432222222220100010000000000000000000001000000030000000200006000800008D116BD16'
经以下语句转换后:
s2:=string(s1);
或s2=s1;
或s2:=strpas(s1);
结果变s2内容变为:'68A400006860316800111168A1281111'#0#0'E9DC7432222222220100010000000000000000000001000000030000000200006000800008D116BD16'
在一个dll工程中,相关代码如下:
var
tx,rxchar;
tempstr,str1:string;
begin
.............
tx:='68A00000689001313216';
SendHex(port,tx,rx);
rx:='68A400006860316800111168A128111111E9DC7432222222220100010000000000000000000001000000030000000200006000800008D116BD16';
tempstr:=string(rx);
...................
搞不清楚啥原因,望高人指点!