Advances printer paper to the top of the next page.

Syntax

EJECT

Description

Use EJECT to position printed output on the page. If you are using a tractor-feed printer (such as a dot matrix printer) and the paper is correctly positioned, EJECT advances the paper to the top of the next sheet. If you are using a single-sheet printer (such as a laser printer), EJECT prints any data in the print queue and ejects the page. Before printing or executing EJECT, connect and turn on the printer.

EJECT works in conjunction with _padvance, _plength, and _plineno. If _padvance is set to "FORMFEED" (the default), issuing the EJECT command from dBASE Plus is equivalent to using your printer's formfeed button or sending the formfeed character (ASCII 12) to the printer. If _padvance is set to "LINEFEEDS", issuing EJECT sends individual linefeeds to the printer until _plineno equals _plength, then resets _plineno to 0. Then, _pageno is incremented by 1. For more information, see _padvance.

EJECT is often used in when printing reports. For example, if PROW( ) returns a value that is close to the bottom of the page, issue EJECT to continue the report at the top of the next page. EJECT automatically resets the printhead to the top left corner of the new page, which is where PROW( ) = 0 and PCOL( ) = 0.

EJECT is the same as EJECT PAGE, except EJECT PAGE also executes any page-handling routine you've defined with ON PAGE.