
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Guide To CA-Clipper - <b>row()</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ROW()
Return the screen row position of the cursor
------------------------------------------------------------------------------
Syntax
ROW() --> nRow
Returns
ROW() returns the cursor row position as an integer numeric value. The
range of the return value is zero to MAXROW().
Description
ROW() is a screen function that returns the current row or line position
of the screen cursor. The value of ROW() is updated by both console and
full-screen commands and functions. @...SAY only updates ROW() when the
current DEVICE is the SCREEN.
ROW() is used with COL() and all variations of the @ command to position
the cursor to a new line relative to the current line. In particular,
you can use ROW() and COL() to create screen position-independent
procedures or functions where you pass the upper-left row and column as
parameters.
ROW() is related to PROW() and PCOL(), which track the current printhead
position instead of the screen cursor position.
Examples
. In this example, ROW() simulates the LIST command, displaying
text on the same line but in different columns:
LOCAL nRow
USE Customer INDEX CustName NEW
DO WHILE .NOT. EOF()
CLS
@ 1, 1 SAY PADR("Name", LEN(CustName))
@ ROW(), COL() + 2 SAY PADR("Address", ;
LEN(Address))
@ ROW(), COL() + 2 SAY PADR("Phone", LEN(Phone))
nRow = 0
DO WHILE nRow++ <= 15 .AND. (!EOF())
@ ROW() + 1, 1 SAY CustName
@ ROW(), COL() + 2 SAY Address
@ ROW(), COL() + 2 SAY Phone
SKIP
ENDDO
WAIT
ENDDO
CLOSE Customer
Files Library is CLIPPER.LIB.
See Also: ?|?? @...GET @...SAY PCOL() PROW()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson