HTBasic Help
×
Menu
Index

PRINTER IS CRT

 
The default PRINTER IS device is the CRT, so normally all output from CAT, LIST, PRINT, and XREF goes to the screen, but it can be redirected to an actual printer (or a file or any other device) with the PRINTER IS statement. Output can be set to wrap at a specified WIDTH, or wrap can be disabled altogether.
 
When PRINTER IS is set to a file, the file is opened and the previous contents of the file are discarded unless the APPEND option is used.
 
The following example program lists itself twice, once to the printer, and once to the CRT.
 
PRINTER IS 9   ! redirect output to the serial printer
LIST
PRINTER IS CRT ! back to the screen
LIST
END