Command EJECT Foundation

Sets the print head at the start of the next page.

Syntax
EJECT
Description

The command EJECT sends the control character 'form-feed' (Chr(12)) to the printer, which also resets the internal counters of the functions PCol() and PRow() back to zero. An automatic page feed occurs when a print row smaller than the current value of PRow() in specified with @...SAY. This automatic behavior can be suppressed if the counter of PRow() is explicitly reset using the function SetPrc().

Examples
EJECT
// The example lists some data from a customer file. As soon as 
// the current print head position is greater than the specified page 
// length, a page feed occurs using EJECT. 

PROCEDURE Main 
   LOCAL nPageLen := 55 
   LOCAL nPageNum := 1 

   USE Customer NEW 
   SET MARGIN TO 8 
   SET PRINTER ON 

   DO WHILE ! Eof() 
      ? PadL( "Page: "+Str(nPageNum,8), 65 ) 
      ? PadL( "Date: "+DtoC(Date())   , 65 ) 
      ? PadL( "Time: "+Time()         , 65 ) 

      DO WHILE PRow() <= nPageLen .AND. .NOT. Eof() 
         ? LName, FName, Phone 
         SKIP 
      ENDDO 

      nPageNum ++ 
      EJECT 
   ENDDO 

   SET MARGIN TO 
   SET PRINTER OFF 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.