Last modified: 30-aug-2003.
Printer output is buffered until Blassic exits or CLOSE LPRINT is done. Thus the amount of printable data is limited by the available memory.
The type of ouptut is controlled by the environment variable BLASSIC_PRINT_COMMAND. Our value is used as a command that will receive in his standard input the printer output bufferd. If is empty, "lp" is used in unix versions and a raw write to the default printer is done in windows.
The line width of the printer output is limited to a value definable with the WIDTH LPRINT instruction, inserting a line separator when exceeded. The line separator is controlled with the system variable PrinterLine, and can be a Line Feed (default value in unix versions, a Carriage Return and a Line Feed (default value in Windows) or Carriage Return. If you do not want this insertion of line separator you can do WIDTH LPRINT 0. The count of characters that forms a line is restored when a LPRINT sentence that ends without separator is executed, a line feed or carriage return explicitly printed is not considered as a line end. This can change in future versions of Blassic.
The LPRINT and LLIST instructions are the same as PRINT and LIST, the only
difference is the default channel used, that in LPRINT and LLIST is 65535
instead of 0. That channel is directed to the printer output, unless an
OPEN, POPEN or SOCKET instruction was used with that number. In that case,
when closed will be directed again to the printer output.
You can redirect that channel with an special form of the OPEN instruction: OPEN "filename" AS LPRINT, that is equivalent to open for output in channel 65535.
When ZONE 0 is specified, the , separator of PRINT will emit a tab character, in other case the space until the next zone is filled with space characters.
Blassic does not emit any type of form feed at the end of the job. In unix versions the spooler probably add it, but in windows, using raw output as we do, will not be added, then in page printers the last data remains in the printer memory waiting for more. The next printing job will probably force a form feed, or you may force it using the printer controls, or you can a add the form feed sequence of your printer to the end of the printing (usually 1A hex, 26 dec character).
Postscript printers are not directly supported, unless your spooler in unix converts automatically non-postscrips job. You can, of course, write a Blassic program that writes valid postscript code.
That's all folks!