Skip to content

WIN ( GETCURSOR )

Get Thoroughbred Basic Window Cursor Position

This string function returns the current cursor position from the terminal Thoroughbred Basic Window or screen in 4 bytes.

WIN ( GETCURSOR [, PHYSICAL] )
PHYSICAL
is an optional specifier that causes the cursor position returned to be based on full screen positioning. Without this option the position returned is based on the cursor position within the current Thoroughbred Basic Window.

This function is generally available starting with release level 8.1.

If you use this function but Thoroughbred Basic Windows is not enabled, an ERR=70 results. For information on how to enable Thoroughbred Basic Windows, please refer to the information on TCONFIG files and IPL files in the chapter on System Files in the Thoroughbred Basic Customization and Tuning Guide.

The format of the returned string is:

Byte(s) Description
1-2 Binary number of cursor column, zero-based
3-4 Binary number of cursor row, zero-based

The returned position is relative to the current terminal Thoroughbred Basic Window unless the PHYSICAL option is specified.

Other WINDOW directives
Additional WIN functions

From the Thoroughbred Basic Language Reference, Volume III: R–Z, version 8.9.1. Open this page in the PDF