Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-09

The crt unit

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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.
------------------------------------------------------------------

Reply by email