summaryrefslogtreecommitdiff
path: root/fpcdocs/mouseex/ex4.pp
blob: b1041c32ada75f1daaf9e4f26682c55b3672040e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Program Example4;

{ Program to demonstrate the GetMouseX,GetMouseY functions. }

Uses mouse;

Var
  X,Y : Word;

begin
  InitMouse;
  Writeln('Move mouse cursor to square 10,10 to end');
  Repeat
    X:=GetMouseX;
    Y:=GetMouseY;
    Writeln('X,Y= (',X,',',Y,')');
  Until (X=9) and (Y=9);
  DoneMouse;
end.