Use the PRINTER statement to control the destination of output from the PRINT statement. It takes the general form:
PRINTER ON redirects all subsequent output from the PRINT statement to the print spooler.
PRINTER OFF redirects all subsequent output from the PRINT statement to the terminal device.
PRINTER CLOSE will act as PRINTER OFF but in addition closes the currently active spool job created by the active PRINTER ON statement.
The following code sample demonstrates the use of the statement.
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
Go back to jBASE BASIC.