How to move a character from left to right on the console screen in Pascal

1 Answer

0 votes
program MoveChar;

uses
  Crt;

var
  x: Integer;

begin
  ClrScr;

  for x := 1 to 50 do
  begin
    GotoXY(x, 5);   { Move cursor to column x, row 5 }
    Write('@');     { Draw character }
    Delay(80);      { Pause for animation }
    GotoXY(x, 5);
    Write(' ');     { Erase previous character }
  end;

  GotoXY(1, 10);
end.



(*
run:
 
                        @
 
*)

 



answered 20 hours ago by avibootz
...