Hello.
With this program:
program test_crt;
begin
readln();
end.
If you press left, right, up, down key, this will be printed:
fred@fredvs ~> ./test_crt
^[[D^[[B^[[A^[[B
I dont want this.
There is a solution, just add
crt in uses section.
program test_crt;
uses
crt;
begin
readln();
end.
Doing this, nothing is printed when using left, right, up, down key.
Perfect but...
If a error is raised by fpc and
crt was not used, like this:
program test_crt;
var
x : integer = 0;
begin
readln();
x := 10 div x; // raise error well aligned
end.
There is still the printed char when left, right, up, down key is pressed but the error appears ok:
fred@fredvs ~> ./test_crt
^[[D^[[C^[[D^[[D
An unhandled exception occurred at $000000000040110A:
EDivByZero: Division by zero
$000000000040110A
Now, adding
crt, no printed char with left, right, up, down key but the error message is not correctly show:
program test_crt;
uses
crt; // adding crt
var
x : integer = 0;
begin
readln();
x := 10 div x; // raise error not aligned
end.
fred@fredvs ~> ./test_crt
An unhandled exception occurred at $000000000040110A:
EDivByZero: Division by zero
$000000000040110A
⏎
Is it possible to have both: no print of left, right, ... char and also good layout of error when using
crt.
Or maybe there is a solution without using
crt to not print left, right, ... char.
Thanks.
Fre;D