LPRINT FORMFEED statement

Purpose

Send a formfeed (page eject) character to an attached printer device.

Syntax

LPRINT FORMFEED

Remarks

For direct connections, LPRINT FORMFEED sends a form-feed character (ASCII character 12, $FF, or CHR$(12)) to the attached line printer device, to ensure the current page will be ejected.  For host-based connections, PowerBASIC signals to the printing subsystem to perform the page eject operation.

Typically, an LPRINT FORMFEED is performed before a LPRINT FLUSH and LPRINT CLOSE.

See also

LPRINT, LPRINT ATTACH, LPRINT CLOSE, LPRINT FLUSH, LPRINT$, XPRINT, XPRINT ATTACH

Example

' Typical LPRINT printing strategy

ERRCLEAR

LPRINT ATTACH "LPT2" ' Use LPT2 device

IF ISTRUE ERR OR ISFALSE LEN(LPRINT$) THEN

  LPRINT "This is your line-printer talking"

  LPRINT FORMFEED      ' Issue a formfeed

  LPRINT FLUSH         ' flush the buffer

  LPRINT CLOSE     ' detach the printer

END IF