text file is not flushed automatically if program endet with halt.
Original Reporter info from Mantis: helbig
-
Reporter name: Wolfgang Helbig
Original Reporter info from Mantis: helbig
- Reporter name: Wolfgang Helbig
Description:
Text file not flushed, even though in ISO-Mode and file name in program header. Program invoked halt(0) which
might be the reason.
Steps to reproduce:
{$MODE ISO}
program isotest2 (in1, file1);
var
file1: text;
in1: text;
a: char;
begin
reset(in1);
rewrite(file1);
while not eof(in1) do
begin
while not eoln (in1) do
begin
read(in1, a); write(file1, a);
end;
readln(in1);
writeln(file1);
end;
halt(0);
end.
$ isotest2 in1 out1
$ wc in1 out1
794 3142 45557 in1
788 3121 45312 out1
1582 6263 90869 total
watch the differences of lines, words and characters of the two text files.
Mantis conversion info:
- Mantis ID: 37960
- OS: os x
- OS Build: 10.11
- Platform: imac
- Version: 3.2.0
- Monitored by: » helbig (Wolfgang Helbig)