The function EOF does not comply to ISO Pascal
Original Reporter info from Mantis: helbig1
-
Reporter name:
Original Reporter info from Mantis: helbig1
- Reporter name:
Description:
EOF returns true even before the file pointer passes the end of file.
Steps to reproduce:
Turn on the ISO mode, compile and run the following program:
program p;
var f: text;
begin
rewrite(f);
f^ := 'a';
put(f);
reset(f);
if eof(f) then writeln('premature eof');
writeln(f^);
if eof(f) then writeln('premature eof');
writeln(f^);
if eof(f) then writeln('premature eof');
get(f);
if eof(f) then writeln('eof correctly set') else writeln('eof should be set, but isn''t');
end.
Additional information:
With this error is a show stopper, if you want to use ISO-Pascal.
Mantis conversion info:
- Mantis ID: 35136
- OS: OS X
- OS Build: 10.11.6
- Platform: x86_64
- Version: 3.0.4
- Fixed in version: 3.3.1
- Fixed in revision: 43801 (#7032c800)
- Monitored by: » helbig (Wolfgang Helbig), » Vincent (Vincent Snijders), » @KaiBurghardt (Kai Burghardt)