cheers
Inc(y);
writeln;
Peter B. Steiger
Cheyenne, WY
----
If you reply by email, send it to pbs at com dot
canada (or vice-versa). All advertisements will be
returned to your postmaster, eh!
gotoxy(wherex,wherey+1);
wherey is the line the cursor is in currently...wherex is the colum...
Greetings
Markus
> Does anybody now how to use the gotoxy function so that it moves down a
line
> each time the program loops.
There are (at least) 3 ways:
1) GotoXY(WhereX, WhereY + 1);
WhereX and WhereY is the cursor current position. Adding 1 to WhereY will
set the cursor to the same x position and a line down. You can also use
GotoXY(1, WhereY + 1) if you want to set x position to 1.
2) WriteLn;
This will set the x position to 1 and the y position a line down.
3) Write(' ');
(Use 80 empty spaces between '');
This a less elegant way of do the same that GotoXY(WereX, WhereY + 1); It
will write 80 empty spaces. The cursor will go to the same x position and
one line down. If you are using a TextBackGround different from the
background color of your screen, the empty spaces will have your current
TextBackGround color.
Regards,
Jaime Gaspar
______________________________
Homepage: www.jaimegaspar.com
E-mail: e-m...@jaimegaspar.com
Write(#10); {goto next line but stay on the same x position
chr(10)=line feed }
Write(#10,#13); {does the same as writeln chr(13)=carriage return}
e.g.
const s:string='hello'+#10+#13+'world';
Writeln(s);
Femme