[Lazarus] How to clear screen in console app

Bo Berglund bo.berglund at gmail.com
Sat Apr 23 10:47:55 CEST 2016


On Sat, 23 Apr 2016 08:10:09 +0000, Mark Morgan Lloyd
<markMLl.lazarus at telemetry.co.uk> wrote:

>I don't know whether the ClrScr procedure refers to libtinfo, or what 
>properties libtinfo thinks the debug window has. It could probably be 
>argued that the debug window should set TERM to indicate that it doesn't 
>obey commands, but I'd suggest that if the program does a ClrScr then 
>the programmer wants notification of this and it should probably /not/ 
>wipe earlier debug output. After all, the debug window is there for 
>debugging, not for normal interaction.
>

I am comparing to how it works in Delphi (7)...
When I program a console program in Delphi and run it from within the
IDE it creates the console window and the interactions are shown
there.
All Writeln() output shows up as is and the program stops for input on
ReadLn() commands etc.

When I started my program in Lazarus nothing showed up at all so I had
to google for it and then I was directed towards the menu
"View/Debug Windows/Terminal Output" which displays a window titled
"Console".
This is the window I refer to and it does not behave like the real
terminal...

If OTOH I open a terminal window and navigate to the project dir and
start the executable produced by Lazarus, then it behaves as expected.

I am working to transfer my GUI test program into a terminal program
with no GUI output so it can be started via the console to map my TCP
interactions.
Then I don't have to access any GUI at all to get the port forwarding
to work. The target RPi is located in Texas behind a slow Internet
connection while I am in Sweden close to Stockholm. A long ways away..

I access the site via VPN but bringing up a TightVNC GUI is no fun due
to the latencies caused by the slow Internet speed.
SSH via PuTTY works much better and I plan on using screen to run the
mapper program while I can continue to work in the terminal base.


-- 
Bo Berglund
Developer in Sweden





More information about the Lazarus mailing list