CRT unit strangely alters behavior of Writeln on Linux
Original Reporter info from Mantis: qptain Nemo
-
Reporter name: qptain Nemo
Original Reporter info from Mantis: qptain Nemo
- Reporter name: qptain Nemo
Description:
See the attached program. The behavior described below is immediately apparent if you pipe the output to a text file.
After line 25 the writeln call starts adding unnecessary CR (13) characters at the end of strings after LF (10), which is invalid and if piped results in text files that have extra empty lines. Without the CRT unit the issue doesn't manifest.
Steps to reproduce:
uses Crt;
var i : dword;
begin
for i:=1 to 30 do begin
writeln('test');
end;
end.
Mantis conversion info:
- Mantis ID: 29679
- OS: Linux
- OS Build: Arch Linux, x64
- Build: 2015/11/26
- Platform: Linux
- Version: 3.0.0