var
  tmp,tmp1:array[0..4] of char
begin
  tmp:=copy(tmp1,2,3);
end;总是报字符串不能付给数组
这样不可以么?我查过help 了UnitSystemCategorystring handling routinesDelphi syntax:function Copy(S; Index, Count: Integer): string;
function Copy(S; Index, Count: Integer): array;可谓啥不行呢?谢谢啦

解决方案 »

  1.   

    我也遇到了同样的问题,只不过两个数组为ARRAY OF STRING,提示我类型不匹配。
      

  2.   

    Returns a substring of a string or a segment of a dynamic array.请看仔细帮助。
    返回的是动态数组。而你的tmp是静态数组,当然不行了。
      

  3.   

    strPCopy(pchar(@tmp[0]),copy(tmp1,2,3)));
      

  4.   

    Copy 函数好像是返回一个字符串。
      

  5.   

    CopyMemory(Dest: Pointer; Source: Pointer; Length: Integer);
      

  6.   

    procedure CopyMemory(Destination: Pointer; Source: Pointer; Length: Cardinal);