Problem with opening file in linux lazarus / 13-General ---------------------------------------------------------------------- poisoner · 2005-11-24 19:47 hi, all. I trying to open file with lazaros on my linux box. But everytime eof(f) is true for any file. I cant understand where i wrong. This is my code Code: [Select] procedure TForm1.Button1Click(Sender: TObject); const      READ_ONLY = 0; var    f : file;    read : string; begin      read := '';      AssignFile(f, '/tmp/aa.txt');      filemode := READ_ONLY;      Reset(f);      seek(f,0);      if eof(f) then ShowMessage('eof');  //this is trueevery time      while not eof(f) do      begin           BlockRead(f , read, 1);           ShowMessage(read);      end;          CloseFile(f); end; ---------------------------------------------------------------------- glober · 2005-11-25 01:43 'read' is a pascal function, you are assigning it as a string, a real bad idea. That's probably where your problem is. ---------------------------------------------------------------------- poisoner · 2005-11-25 13:32 but my problem is before that. Because when i open a file eof(myfile) = true. When i seek to begining of the file, it is again eof. I think its open empty file. But the files with which i trying are not empty.