Col Function | |
Return the current column position of the cursor in the terminal window.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax public static short Col()
Request Example
View SourceReturn Value
Type:
Short
The column in which the cursor is currently located.
This value can range from 0 to MaxCol().
Remarks
The value returned by Col() changes whenever the cursor position changes in the terminal window; for example, both console and full-screen commands can change the cursor position. In addition, Col() is automatically set to 0 whenever a CLEAR, CLEAR SCREEN, or CLS() is executed.
Examples
This example displays a file name at a specified row and column:
1FUNCTION Start()
2LOCAL cErrorMessage AS STRING
3LOCAL cFileName AS STRING
4cErrorMessage := "File not found."
5cFileName := "customer.dbf"
6SetPos(1, 10)
7QQout(cFileName)
8SetPos(Row(), Col() + 2)
9QQOut(cErrorMessage)
See Also