On 5/22/07, A.J. Venter <[EMAIL PROTECTED]> wrote:
CRT is one way but rather relies on using the whole console. Anyway
ncrt is safer. Sounds like you need something like this:
uses ncrt;

I got interrested on this, so I wrote a test program. I tested with
both ncrt and crt, and actually I found that ncrt will erase the whole
console and start writing from position (1,1), while crt will keep
things that already exist on the console and start writing on the next
line.

So, for some uses, crt may be nicer.

program console;

{$mode objfpc}{$H+}

uses
 crt, SysUtils; // here you can change crt with ncrt

begin
 Write('[                    ] 0%');
 GotoXY(1, WhereY);
 Sleep(200);

 Write('[=>                  ] 10%');
 GotoXY(1, WhereY);
 Sleep(200);

 Write('[===>                ] 20%');
 GotoXY(1, WhereY);
 Sleep(200);

 Write('[=====>              ] 30%');
 GotoXY(1, WhereY);
 Sleep(200);

 Write('[=======>            ] 40%');
 GotoXY(1, WhereY);
 Sleep(200);

 Write('[=========>          ] 50%');
 GotoXY(1, WhereY);
 Sleep(200);
end.

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to