Copy(DataList.Strings[i],0,11)什么意思?
请解释具体些...

解决方案 »

  1.   

    Copy('123456789',1,3)='123'
    0比较奇怪,你可以试试看,我认为应该是1比较合理。
      

  2.   

    左边的DD呢?
    ??? := copy(datalist.strings[i],0,11);
    如果没有左边的DD,这句写了也明写。
    datalist是tstringlist?
    copy你可以看delphi的help啊?
    Returns a substring of a string or a segment of a dynamic array.UnitSystemCategorystring handling routinesfunction Copy(S; Index, Count: Integer): string;
    function Copy(S; Index, Count: Integer): array;DescriptionS is an expression of a string or dynamic-array type. Index and Count are integer-type expressions. Copy returns a substring or sub array containing Count characters or elements starting at S[Index]. If Index is larger than the length of S, Copy returns an empty string or array.If Count specifies more characters or array elements than are available, only the characters or elements from S[Index] to the end of S are returned.Note: When S is a dynamic array, Copy can only be used as a parameter in a call to a procedure or function that expects an array parameter. That is, it acts like the Slice function when working with dynamic arrays.
    //
    比如:datalist.strings[i] = '123456789abcdef'的字串。
    copy(datalist.strings[i],0,11);
    就返回'123456789ab'