The crt unit

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The crt unit

Carsten Bager
If you run this small program on a Linux machine (386/Arm), you
will se that if you presses the keys so 2 or more lines are written and
then presses the 'a' key that writes out WhereX and WhereY. It will
write out the right position on the first line (80,1).
If I do the same in windows the cursor donĀ“t move on to the next line.
If I compile the program in TP6, it acts as I would expect.
I think this is an error in the FPC crt unit.
Do you agree?

Carsten
---------------------------------------
program tst;

uses
   crt;
var
  c:char;
begin
  clrscr;
  c:=chr(0);
  repeat
    if keypressed then
    begin
      c:=readkey;
      write(c);
      if c='a' then
        Write('[',WhereX:1,'/',WhereY:1,']');
    end;
  until c=chr(27);
end.
------------------------------------------------------------------
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal