Free Pascal Lazarus Program Tutorial 19 - Gotoxy Screen Location


Gotoxy places the text cursor at a position on the screen. This allows the computer to write text at different locations on the screen with ease.

Gotoxy is not to be confused with the goto command. The goto command should not be used when programming with Pascal.

The origin (upper left-hand corner) is located at (1,1).

Syntax
gotoxy(x coordinate, y coordinate);
gotoxy(x,y);

Examples
gotoxy(1,1);
write('This text starts at 1,1');

gotoxy(5,8);
write('This text starts at 5,8');

Code Download
FPProgT19.zip