< Futurebasic < Language < Reference

LPRINT

Syntax

LPRINT [@(col,row)|%(h,v)] [itemList]

Description

This statement sends a line of text to the printer. The @(col,row) and %(h,v) options specify where on the page the line should be printed (see the PRINT statement); if you don't specify one of these, the line is printed at the current pen position of the printing grafPort (this is usually just under the previously-printed line).

The LPRINT statement is equivalent to the following group of lines:

ROUTE _toPrinter PRINT [@(col,row)|%(h,v)] [itemList] ROUTE _toScreen

LPRINT is inefficient if you are printing many lines to a page, because it reroutes the output each time LPRINT is executed. In such cases, it's better to execute a sequence of PRINT statements, with the entire sequence preceded by a single ROUTE _toPrinter statement and followed by a single ROUTE _toScreen statement.

FB Lite behavior: When you use the "FB Lite" runtime, the text-position parameters [@(col,row)|%(h,v)] are ignored.

Note: You should execute CLEAR LPRINT or CLOSE LPRINT in order to cause the printed page to be put out, after you have finished printing to it.

See Also

PRINT; CLEAR LPRINT; CLOSE LPRINT; ROUTE

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.