On Fri, 10 Jul 2020, Bo Berglund via fpc-pascal wrote:
On Fri, 10 Jul 2020 01:26:24 +0200, Tomas Hajny <xhaj...@hajny.biz> wrote:
Here I use the blocking Read(ch) instead and now Enter makes the code move on to the termination phase. It will not be used at all in the production program... But I really asked about the *difference* between Windows and Linux behaviour because on Windows the original code works fine without any screen mess.
The crt unit has been in use for 25 years. It behaves as expected. However, times change, terminals too, so who knows. Before answering to you I wrote a small program that does what you do. Write to screen, wait for keypress. Write again to screen. It behaves as expected: the next line is written flushed-left. The only difference with your program is that mine does not use threads which also write to screen. So the hypothesis that it is the threads that are messing up the terminal. It can also be that Indy messes up the terminal but I consider this less likely. Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal