xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Col()

Returns the current column position of the screen cursor

Syntax

Col()  --> nColPos

Return

The function returns a numeric value indicating the current column position of the screen cursor. The leftmost column has position 0 and the rightmost position is identified by MaxCol().

Description

The function returns the current cursor column position within a console window (text-mode). The cursor position changes with screen output using console output commands and functions.

Use function SetPos() to position the screen cursor at a defined row and column coordinate.

Info

See also:@...CLEAR, @...GET, @...SAY, CLEAR SCREEN, MaxCol(), MaxRow(), PCol(), PRow(), Row(), SetMode(), SetPos()
Category: Screen functions
Source:rtl\setpos.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The examples displays and changes the screen cursor position.

   PROCEDURE Main
      ? Col()                          // result: 0

      ? "xHarbour"

      ? Col()                          // result: 8
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe