delete(bufstr,1,pos('^^^',bufstr)+2);
          xmm:=COPY(bufstr,1,POS('|',BUFSTr)-1);
          delete(bufstr,1,pos('|',bufstr));
          datas:= COPY(bufstr,1,POS('|',BUFSTr)-1);
          delete(bufstr,1,pos('|',bufstr));
          xmm:=xmm+copy(bufstr,1,POS('|',BUFSTr)-1);
          xmm:=CodeToName(exepath,IntToStr(fixcode),xmm);
          if pos('Err',datas)>0 then datas:='';
          if pos('FAILED',datas)>0 then datas:='';

解决方案 »

  1.   

    delete就是删除,从指定位置删除多少个字符,看他的意思,就是删除|前的字符
      

  2.   

    假设bufstr := 'aaa^^^bbb|ccc|ddd|'
    按语句顺序依次达到的结果为:
    bufstr := 'bbb|ccc|ddd|'
    xmm := 'bbb'
    bufstr := 'ccc|ddd|'
    datas := 'ccc'
    bufstr := 'ddd|'
    xmm := 'bbbddd'
    xmm := 一个转换函数
      

  3.   

    选中Delete,按F1会有详细讲解
    Unit 
    System Syntax 
    [Delphi] procedure Delete(var S: string; Index: Integer; Count: Integer);
    Description 
    In Delphi code, Delete removes a substring of Count characters from string S starting with S[Index]. S is a string-type variable. Index and Count are integer-type expressions. 
    If index is larger than the length of the string or less than 1, no characters are deleted.
     
    If count specifies more characters than remain starting at the index, Delete removes the rest of the string. If count is less than or equal to 0, no characters are deleted.