K kelphi Unregistered / Unconfirmed GUEST, unregistred user! 2005-08-26 #1 var s:string; sa:array[0..6] of char;<br>begin<br> s:='12345';<br> sa=s; //说明一下:因为我要的最终结果是sa,但是目前给的参数是s,怎么才能让string转换成arry呢?<br>end;
var s:string; sa:array[0..6] of char;<br>begin<br> s:='12345';<br> sa=s; //说明一下:因为我要的最终结果是sa,但是目前给的参数是s,怎么才能让string转换成arry呢?<br>end;
K kelphi Unregistered / Unconfirmed GUEST, unregistred user! 2005-08-26 #2 var s:string; sa:array[0..6] of char;<br>begin<br> s:='12345';<br> sa=s; //说明一下:因为我要的最终结果是sa,但是目前给的参数是s,怎么才能让string转换成arry呢?<br>end;
var s:string; sa:array[0..6] of char;<br>begin<br> s:='12345';<br> sa=s; //说明一下:因为我要的最终结果是sa,但是目前给的参数是s,怎么才能让string转换成arry呢?<br>end;
A app2001 Unregistered / Unconfirmed GUEST, unregistred user! 2005-08-26 #3 这样看一下??<br>Move(PChar(s)^, sa[0], Length(s));
K kelphi Unregistered / Unconfirmed GUEST, unregistred user! 2005-08-26 #4 好象是不行啊,你的意思是 sa:=Move(PChar(s)^, sa[0], Length(s)); 还有没有其他办法?
A app2001 Unregistered / Unconfirmed GUEST, unregistred user! 2005-08-26 #5 Move(PChar(s)^, sa[0], Length(s)); 就可以了,不需要SA在前面再赋值了.