Skip to main content

PRINTER

Specifies whether to direct output to the printer.

Synopsis

PRINTER ON
PRINTER OFF
PRINTER CLOSE [ON nnn]

Arguments

ON nnn Optional — The print channel as assigned by the PRINT statement. Specified as an integer value in the range 0 through 255. If omitted, the default is print channel 0.

Description

PRINTER ON directs output to the printer. After setting this option, PRINT statements direct their output to the print buffer, with the exception of PRINT ON 0 or PRINT ON -1 which always output to the terminal screen. PRINTER ON has no effect on CRT statements, which always output to the terminal screen.

PRINTER CLOSE spools the print buffer to the printer and closes the print channel. The ON nnn clause allows you to specify which print channel. If this clause is omitted, Caché MVBasic closes print channel 0; this behavior is emulation-dependent. An implicit PRINTER CLOSE is issued when the program terminates.

PRINTER OFF directs subsequent output to the screen (the default output device).

Note:

PRINTER RESET is listed in this manual as a separate command, not an option of the PRINTER command.

Emulation

PRINTER CLOSE with no argument closes only print channel 0 in Caché and in UniVerse emulation (and some other emulations). In PICK and Reality (and some other emulations) PRINTER CLOSE with no argument closes all print channels. This behavior is governed by the SP-CONDUCT bit mask 4096.

See Also

FeedbackOpens in a new tab