[fpc-pascal]unix EOF

Cyril Zlachevsky mazay at phone.dn.ua
Thu Jun 6 21:31:57 CEST 2002


I try to find correct way finding end of file (EOF) in fpc-program, but 
not have success:
---cut ttt.pp---
var
     f           :       file of char;
     TmpChar     :       char;
begin
     TmpChar:=' ';
     Assign(f,paramstr(1));
     Reset(f);
     while (TmpChar <> #26) do read(f,TmpChar);
end.
---cut ttt.pp---

---cut---
$ ./ttt ttt.pp
Runtime error 100 at 0x08052164
   0x08052164
   0x080480B0
   0x00000000
---cut---

please help me to find right way!





More information about the fpc-pascal mailing list