PRINTER


The PRINTER statement is used to control the destination of output from the PRINT statement.

 

COMMAND SYNTAX

PRINTER ON
PRINTER OFF
PRINTER CLOSE {ON channel_number}

 

NOTES

PRINTER ON will cause all subsequent output from the PRINT statement to be redirected to the print spooler.

PRINTER OFF will cause all subsequent output from the PRINT statement to be redirected to the terminal device.

PRINTER CLOSE will act as PRINTER OFF but in addition will close all currently active spool jobs created by the active PRINTER ON statement. If the optional ON channel_number is specified then only the print job created on that channel number will be closed.

 

EXAMPLES

PRINTER ON;* Open a spool job
FOR I =1 TO 60
    PRINT "Line ":I ;* Send to printer
    PRINTER OFF
    PRINT "+": ;* Send to terminal
    PRINTER ON ;* Back to printer
NEXT I
PRINTER CLOSE ;* Allow spooler to print it


jBC