Recent

Author Topic: console programs - write text to right lower corner in window  (Read 1859 times)

adam_r

  • Newbie
  • Posts: 2
console programs - write text to right lower corner in window
« on: November 09, 2014, 05:48:36 pm »
Hello !

In FreePascal 2.0.4 and lower versions was possible to write to right lower corner without move a cursor.
Example:

uses crt;
var s:string;i:byte;
begin
s:='';
for i:=1 to 80 do s:=s+'A';
{in s we have 80 'A' characters}
window(1,1,80,25);
clrscr;
gotoxy(1,25);
write(s);
end.

In FreePascal 2.0.4 or lower the first character of the text was in position 1,25, the last in 80,25.
In FreePascal 2.6.4 the text is moved one line upper (begins from pos 1,24 ends on 80,24).

Is the way to keep the text, like in fpc 2.0.4 without resize of the window to (1,1,80,26) or (1,1,81,25) or other sizes ?

adam_r

  • Newbie
  • Posts: 2
Re: console programs - write text to right lower corner in window
« Reply #1 on: November 27, 2014, 06:54:04 pm »
I've resolved the problem. I wrote my own CRT unit. I use it, but I'm using not much functions and constants from CRT, so not all are implemented yet. If I finish the full unit, I'll share it (LGPL). My UNIT is UTF8 compatible (oryginal CRT,NCRT,OCRT are not).

 

TinyPortal © 2005-2018