Sign in Join
FPDoc Onlineexperiment

WhereX function

In unit Crt

Return X (horizontal) cursor position.

Declaration

pascal
function WhereX: tcrtcoord

Description

WhereX returns the current X-coordinate of the cursor, relative to the current window. The origin is (1,1), in the upper-left corner of the window.

Errors

None.

See also

Example: ex7

pascal
Program Example7;
uses Crt;

{ Program to demonstrate the WhereX and WhereY functions. }

begin
  Writeln('Cursor postion: X=',WhereX,' Y=',WhereY);
end.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.