[fpc-pascal] Crt changes behaviour of long line wrapping with write on Win terminal
Seweryn Walentynowicz
seweryn at walor.torun.pl
Thu Jul 3 10:58:58 CEST 2008
I compile this simple program:
program Bug817;
uses Crt;
begin
write('one line over 40 chars long--------------');
write('the second one+++++++++++++++++++++++++++');
writeln('and third################################');
end.
correct output from this program looks like:
one line over 40 chars long--------------the secondone+++++++++++++++++++++++++++and third################################
// one line over 80 chars wrapped at end of terminal line
This result I got on any linux terminal, but if I compile and run this
on Windows terminal window, this look like below:
one line over 40 chars long--------------and third##############################
// one line where each next text in line override last one
If I remove 'uses Crt' from this program, all works fine on both linux
and Windows. Of course, 'write' doesn't need this unit, but I need it
for other reason.
Why including Crt unit changes behaviour of write() procedure ? How can
I solve this in windows terminal ?
regards
--
Seweryn Walentynowicz
S.Walentynowicz at walor.torun.pl
More information about the fpc-pascal
mailing list