xHarbour Reference Documentation > Function Reference |
Moves the cursor or printhead to a row and column coordinate
DevPos( <nRow>, <nCol> ) --> NIL
When SET DEVICE TO PRINTER is active, the largest coordinate for both, row and column, is 32766.
The return value is always NIL.
The DevPos() function accepts numeric row and column coordinates and positions the screen cursor or printhead accordingly. Coordinates begin at point 0, 0 which is the upper left corner of the screen, or paper.
When SET DEVICE is set to SCREEN, DevPos() moves the screen cursor to the specified coordinates and updates Row() and Col().
If the current device is the PRINTER, DevPos() moves the printhead to the new row and column coordinate, taking any SET MARGIN setting into account. In addition, the current printhead position as reported by PRow() and PCol() is considered. That is, if <nRow> id smaller than PRow(), a formfeed (Chr(12)) is sent to the printer causing the printhead be positioned on a new page. If <nCol> is smaller than PCol(), the printhead is positioned on a new line.
Notes: use SetPrc() to adjust the internal counters of PRow() and PCol() if required.
When printer output is redirected to a file, DevPos() output is recorded in that file.
See also: | @...SAY, Col(), DevOut(), PCol(), PRow(), QOut() | QQOut(), ROW(), SET DEVICE, SetPos(), SetPrc() |
Category: | Output functions |
Source: | rtl\console.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com