[Lazarus] How to clear screen in console app
Michael Van Canneyt
michael at freepascal.org
Sat Apr 23 11:24:02 CEST 2016
On Sat, 23 Apr 2016, Bo Berglund wrote:
> 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...
No, it does not. Because it is not a real terminal and does not obey the
ANSI codes to control the terminal.
Michael.
More information about the Lazarus
mailing list