{{fbdoc item="title" value="POS"}}----
Returns the horizontal (left to right) position of the text cursor

{{fbdoc item="syntax"}}##
	[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Pos** ( ) [[KeyPgAs as]] [[KeyPgLong long]]
	[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Pos** ( [[KeyPgByval byval]] //dummy// [[KeyPgAs as]] [[KeyPgLong long]] ) [[KeyPgAs as]] [[KeyPgLong long]]
##
{{fbdoc item="usage"}}##
	//result// = **Pos**[ ( //dummy// ) ]
##
{{fbdoc item="param"}}
	##//dummy//##
		An unused parameter retained for backward compatibility with QBASIC.

{{fbdoc item="ret"}}
	Returns the horizontal position of the text cursor.

{{fbdoc item="desc"}}
	Returns the horizontal (left to right) position of the text cursor. The leftmost column is number ##1##.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/console/pos.bas"}}%%(freebasic)
dim as integer p

'' print starting column position
p = pos()
Print "position: "; p

'' print a string, without a new-line
Print "ABCDEF";

'' print new column position:
p = pos()
Print: Print "position: "; p
Print

''position changes after each Print:
Print "Column numbers: "
Print Pos(), Pos(), Pos(), Pos(), Pos()
%%

{{fbdoc item="diff"}}
	- The ##//dummy//## parameter was not optional in QBASIC.

{{fbdoc item="see"}}
	- ##[[KeyPgCsrlin Csrlin]]##
	- ##[[KeyPgTab Tab]]##
	- ##[[KeyPgLocate Locate]]##

{{fbdoc item="back" value="CatPgConsole|Console Functions"}}