var<br> F: TextFile;<br> S,temp: string;<br> arr:array[0..300] of string;<br> str:array[0..255] of char;<br> i,j,m,k,n:integer;<br>begin<br> i:=0;j:=0;m:=0;n:=0;<br> k:=0;<br> if OpenDialog1.Execute then { Display Open dialog box }<br> begin<br> AssignFile(F, OpenDialog1.FileName); { File selected in dialog }<br> Reset(F);<br> Readln(F, S);<br> if StrPos(PChar(s),PChar('qq'))<>nil then<br> begin<br> while not eof(F) do<br> begin<br> Readln(F, S);<br> if StrPos(PChar(s),'**恒载内力**') <>nil then<br> begin<br> break;<br> end;<br> end;<br> end;<br><br> /////////////<br> Readln(F,S);<br> while StrPos(PChar(s),'ww')=nil do<br> begin<br> Readln(F, S);<br> if StrPos(PChar(s),'-- 柱')<>nil then<br> begin<br> Readln(F,S);<br> while StrPos(PChar(s),'--')=nil do<br> begin<br> ////<br> //showmessage(S);<br><br> StrPcopy(str,S);<br> //str:=PChar(S);<br> //showmessage(s[7]);<br><br><br> /////////////<br> for i:=0 to (Strlen(str)-1) do<br> begin<br> if (CompareStr(str,' ')=0) then<br> begin<br> if (CompareStr(str[i+1],' ')<>0) then<br> m:=i+1;<br> end;<br> ///////////////<br> if (CompareStr(str,' ')<>0) then<br> begin<br> if (CompareStr(str[i+1],' ')=0) then<br> begin<br> n:=i;<br> //showmessage(Copy(str,m,(n-m+2)));<br> temp:=Copy(str,m,(n-m+2));<br> arr[k]:=temp;<br> k:=k+1;<br> //////////<br> end;<br> end;<br><br> end;<br> Readln(F,S);<br> end;<br> end;<br> end;<br> showmessage(arr[6]);<br><br> CloseFile(F);<br> end;<br><br>end;