cursor_pos

Gets/sets cursor screen position.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X      

Syntax

int cursor_pos([position])
int             position

Description

Returns the cursor's screen position (row * G.SCREENCOLS + column).
position (optional) specifies a cursor position (position / G.SCREENCOLS, position \% G.SCREENCOLS).

the value of position must be between 0 and (G.SCREENROWS * G.SCREENCOLS - 1).

If the value specified is < 0, then position is 0.

If position is > (G.SCREENROWS * G.SCREENCOLS - 1) then position is (G.SCREENROWS * G.SCREENCOLS - 1).

Example

Places the cursor in the lower right hand side of the screen.
cursor_pos(G.SCREENROW * G.SCREENCOLS - 1);