Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Guide To CA-Clipper - <b>prow()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PROW()
 Return the current row position of the printhead
------------------------------------------------------------------------------
 Syntax

     PROW() --> nRow

 Returns

     PROW() returns an integer numeric value that represents the number of
     the current line sent to the printer.  The beginning row position is
     zero.

 Description

     PROW() is a printer function that reports the row position of the
     printhead after the last print operation.  PROW() is updated only if
     either SET DEVICE TO PRINTER or SET PRINTER ON is in effect.  PROW() is
     like ROW() except that it relates to the printer rather than the screen.
     PROW() is updated in the following ways:

     .  Application startup sets PROW() to zero

     .  EJECT resets PROW() to zero

     .  A print operation sets PROW() to the last row print position

     .  SETPRC() sets PROW() to the specified row position

     PROW() used with PCOL() prints a value to a new row relative to the last
     row printed.  If the printhead is positioned to a new row with a control
     code, a line feed (CHR(10)), or form feed (CHR(12)), PROW() is not
     updated and, therefore, will not return the expected value.  To prevent
     this discrepancy, reset PROW() to the correct value with SETPRC() after
     sending any of these characters to the printer.

 Examples

     .  This example uses PROW() and SETPRC() to create a simple one-
        across label program that prints with @...SAY instead of ?:

        USE Customer INDEX CustName NEW
        SET DEVICE TO PRINTER
        SETPRC(2, 0)
        DO WHILE !EOF()
           @ PROW(), 3 SAY CustName
           @ PROW() + 1, 3 SAY RTRIM(City) + ",;
                  " + RTRIM(State) + ZipCode
           @ PROW() + 1, 3 SAY Phone PICTURE "@R ;
                 (999) 999-9999"
           SETPRC(2, 0)
           SKIP
        ENDDO
        SET DEVICE TO SCREEN
        CLOSE

 Files   Library is CLIPPER.LIB.


See Also: ?|?? @...SAY EJECT PCOL() QOUT() ROW()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson