var f:textfile; str:string; i:integer; begin assignfile(f,'a.txt'); reset(f); while not eof(f) do begin inc(i); readln(f, str); if i=3 then showmessage(str); end; closefile(f); end;
var i:integer; f:Textfile; s:array[3..5] of string; begin assignfile(f,文件名); reset(f); for i:=1 to 2 do readln(f,s[3]); readln(f,s[3]); readln(f,s[4]); readln(f,s[5]); fileclose(f); end;
TSTRINGLIST.STRING[2]....
f:textfile;
str:string;
i:integer;
begin
assignfile(f,'a.txt');
reset(f);
while not eof(f) do
begin
inc(i);
readln(f, str);
if i=3 then
showmessage(str); end;
closefile(f);
end;
i:integer;
f:Textfile;
s:array[3..5] of string;
begin
assignfile(f,文件名);
reset(f);
for i:=1 to 2 do
readln(f,s[3]);
readln(f,s[3]);
readln(f,s[4]);
readln(f,s[5]);
fileclose(f);
end;
TSTRINGLIST.STRING[2]....用数组很快的
它没有LOADFROMFILE 这个属性方法,,
str:tstringlist;
begin
str:=tstringlist.Create;
str.LoadFromFile('d:\ks\winace.txt');
showmessage(str[3]);