I'm adapting a couple of console programs from Windows to Linux. For to test the program output I wanted to use the Terminal Output Window, which you can find in Lazarus menu View / Debug Windows / Terminal Output. But this console window has several disadvantages:
- there are always some ugly special chars at program start
- gotoxy() does not work
- clrscr() does not work
- colors via 'TextAttr' do not work
- lines are broken after 80 chars although the window can hold much more
- the font has not an equal width for each char (important for columns of tables)
- when you start the program, this window doesn't come to front
Here is a demo program and attached a screenshot of its output:
uses crt;
begin
writeln('Hello world');
gotoxy(20,20); writeln('This should be position (20,20)');
clrscr; writeln('Screen cleared');
TextAttr:=Red; writeln('This is red color');
writeln('This is a longer text of 89 characters, but the line is broken to a new line without need');
writeln('mmmmmmmmmm (10 chars)');
writeln('iiiiiiiiii (10 chars)');
end.
Is it possible to avoid this disadvantages?
I'm an absolute beginner on Linux. How do others test their console programs out of Lazarus on Linux?
I'm using Lazarus 1.8.4 on Ubuntu 18.04 with KDE-Plasma desktop.
Thanks in advance.