Hi.
2 is mandatory to read file. It opens the file in read mode.
if you put it, 1 and 3 are unnecessary,
unless the file does not exist. But you can check if file exists with this
if fileExists(eFilenameEdit.Text) then
begin
assignfile(dottxt,eFilenameEdit.Text);
reset(dottxt);
repeat
readln(dottxt,ln);
until(eof(dottxt)) ;
closefile(dottxt);
end else showMessage('File '+eFilenameEdit.Text+' doesn`t exist');