----- Original Message -----
From: Felipe Monteiro de Carvalho <[EMAIL PROTECTED]>
Date: Tuesday, May 22, 2007 10:02 am
Subject: Re: [lazarus] Linux WriteLn - Staionary Output - how is done?

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

I used this to write a program without crt at all.

program console;

{$mode objfpc}{$H+}

uses
  SysUtils; // here you can change crt with ncrt
  
var
  i: integer;

begin
  Write('[                    ] 0%');
  Sleep(2000);

  Write(#13'[=>                  ] 10%');
  Sleep(2000);

  Write(#13'[===>                ] 20%');
  Sleep(2000);

  Write(#13'[=====>              ] 30%');
  Sleep(2000);

  Write(#13'[=======>            ] 40%');
  Sleep(2000);

  Write(#13'[=========>          ] 50%');
  Sleep(2000);
end.

(Tested on windows).

Vincent 

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

Reply via email to