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.2 . The Guide To CA-Clippe - <b>eject</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 EJECT
 Advance the printhead to top of form
------------------------------------------------------------------------------
 Syntax

     EJECT

 Description

     EJECT is a printing command that sends a formfeed character (CHR(12)) to
     the printer and sets the PCOL() and PROW() values to zero.  If you
     address a printer row less than the last row position since an EJECT or
     SETPRC() was executed, CA-Clipper automatically performs an EJECT.
     Because of this, your printing logic must proceed sequentially from left
     to right down the page.  If you need to reset the internal printer row
     and column values to zero without sending a formfeed, use SETPRC().

 Examples

     .  This example prints a simple list report and uses EJECT to
        advance to a new page when the line counter reaches the maximum
        number of lines to print per page:

        LOCAL nLine := 99, nPage := 0
        USE Sales NEW
        SET PRINTER ON
        SET CONSOLE OFF
        DO WHILE !EOF()
           IF nLine > 55
              EJECT
              ? "Page " + LTRIM(STR(++nPage, 3))
              ? "Date " + CTOD(DATE())
              ?
              ? "Salesman", "Amount"
              ?
              nLine := 6
           ENDIF
           ? Sales->Salesman, Sales->Amount
           nLine++
           SKIP
        ENDDO
        SET PRINTER OFF
        SET CONSOLE ON
        CLOSE

 Files:  Library is CLIPPER.LIB.

See Also: SET CONSOLE SET DEVICE SET PRINTER SETPRC()

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