delete(TmpRetStr,1,14); //Index:=3; Index:=1; TmpStr:=TmpRetStr; for m:=1 to i do begin try j:=0; pp:=StrToInt64('$'+copy(TmpRetStr,3,2)+copy(TmpRetStr,1,2)); TmpRetStr:=copy(TmpRetStr,1,pp*2-2); while j <NameListStr.Count do begin DisposJLMB3Burth(TmpRetStr,Cdate,Index,j); Index:=Index+1; j:=j+1; if j=4 then begin TmpLen:=StrToInt64('$'+FDataRecord[Index-1].DataValue); for pp:=1 to 23 do begin if (TmpLen and 1)=1 then begin if (pp>12) and (pp <18) then for n:=0 to 2 do begin DisposJLMB3Burth(TmpRetStr,Cdate,Index,j); j:=j+1; Index:=Index+1; end else if pp=22 then begin for n:=0 to 3 do begin DisposJLMB3Burth(TmpRetStr,Cdate,Index,j); j:=j+1; Index:=Index+1; end end else begin DisposJLMB3Burth(TmpRetStr,Cdate,Index,j); j:=j+1; Index:=Index+1; end; end //if (TmpLen and 1)=1 then else begin if (pp>12) and (pp <18) then j:=j+3 else if pp=22 then j:=j+4 else j:=j+1; end; //else begin TmpLen:=TmpLen shr 1; end;// for pp:=1 to 23 do end; //if j=4 then end; //while j <NameListStr.Count do except continue; end; //try delete(TmpRetStr,1,2); end; //for m:=1 to i do end;
================================== function FReplaceStr(aStr : String; DestStr:string; RepStr :string) : String; var i,Len:integer; TmpStr : string; ResultStr : string; begin Len := Length(DestStr); for i:=1 to length(aStr) div Len do begin TmpStr := copy(aStr,(i-1)*Len+1,Len); if(TmpStr=DestStr) then TmpStr := RepStr; ResultStr:=ResultStr + Tmpstr; end; result := ResultStr; end;