Jak z pliku odczytać daną linię (chciałbym z eof) do edita. Póbuję ale coś nie wychodzi.
linia jest w array'u
procedure TForm1.BitBtn2Click(Sender: TObject);
var y,i:integer;
begin
randomize;
y:=random(15)+1;
i:=0;
if opendialog1.execute then
begin
assignfile(plik,opendialog1.filename);
reset(plik);
for i:=1 to 15 do
begin
readln(plik,linia[y]);
closefile(plik);
end;
end;
//edit2.text:=(inttostr(linia[2]));
//edit3.text:=(inttostr(linia[3]));
//edit4.text:=(inttostr(linia[4]));
//edit5.text:=(inttostr(linia[5]));
end;
może ktoś wie jak to zrobić????