核心提示:1、var buf:array[1..100] of byte; S1:string; s2: string; begin s1 := '12345'; Move(s1[1],buf[1],5); S...
1、
var
buf:array[1..100] of byte;
S1:string;
s2: string;
begin
s1 := '12345';
Move(s1[1],buf[1],5);
SetLength(s2,5);
Move(buf[1],s2[1],5);
ShowMessage(s2);
2、
var
buf:array[1..100] of byte;
S1:string;
s2:string;
begin
s1 := '12345';
Move(s1[1],buf[1],5);
s2 := StrPas(pchar(@buf[1]));
ShowMessage(s2);
3、
for i:=1 to 100 do
begin
s:=s+chr(buf[i]);
end;