NAME

pos - return the horizontal coordinate of the cursor

SYNOPSIS

v = pos(N)

DESCRIPTION

Pos returns the current horizontal (column) position of the cursor.  The leftmost column is identified as column 1.  The argument N is unused. 

To get the current line (row) location of the cursor, use the csrlin variable. 

EXAMPLE

The program
	lin = csrlin		'record current line
	col = pos(0)		'record current column
	locate 12, 36		'center the cursor
	print "Basmark"
	locate lin, col		'restore position
saves the current vertical position of the cursor in the variable lin and the current horizontal position of the cursor in the variable col.  It then moves the cursor to line 12, column 36, and prints the string "Basmark" there.  Finally, it moves the cursor back to the saved position as specified by the values of lin and col. 

SEE ALSO

csrlin, locate

from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber