LPRINT: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 13: Line 13:
* [[LPRINT USING]] can print formatted text data to a page identically to how [[PRINT USING]] formats a program screen.
* [[LPRINT USING]] can print formatted text data to a page identically to how [[PRINT USING]] formats a program screen.
* [[COLOR]]ed text and images can be printed using [[_PRINTIMAGE]] which stretches them to fit the default printer's paper size.
* [[COLOR]]ed text and images can be printed using [[_PRINTIMAGE]] which stretches them to fit the default printer's paper size.
* LPRINT will only print to the default USB or LPT printer set up in Windows. '''[[Keywords_currently_not_supported_by_QB64#Keywords_not_supported_in_Linux_or_macOS_versions|Keyword not supported in Linux or macOS versions]]'''
* LPRINT will only print to the default USB or LPT printer set up in Windows. '''[[Keywords currently not supported by QB64#Keywords_not_supported_in_Linux_or_macOS_versions|Keyword not supported in Linux or macOS versions]]'''.
* Note: Printer ''escape codes'' starting with [[CHR$]](27) will not work with LPRINT and may produce text printing errors.
* Note: Printer ''escape codes'' starting with [[CHR$]](27) will not work with LPRINT and may produce text printing errors.


Line 19: Line 19:
{{PageSeeAlso}}
{{PageSeeAlso}}
* [[LPRINT USING]]
* [[LPRINT USING]]
* [[_PRINTIMAGE]] {{text|(prints color images to page size)}}
* [[_PRINTIMAGE]] {{Text|(prints color images to page size)}}
* [[PRINT]], [[PRINT USING]]
* [[PRINT]], [[PRINT USING]]
* [[Windows Printer Settings]]
* [[Windows Printer Settings]]

Latest revision as of 22:36, 11 February 2023

The LPRINT statement sends string text or numerical values to a parallel port (LPT1) printer in QBasic or a USB printer in QB64.


Syntax

LPRINT [expression] [{;|,}]


Description

  • expression is one or more text or numerical expressions separated by a semi-colon (;) or comma (,).
  • Syntax is the same as PRINT, but cannot use a port number.
  • Program does not have to OPEN the LPT1: parallel port.
  • Assumes a 80 character wide page. WIDTH LPRINT is not supported in QB64.
  • LPRINT USING can print formatted text data to a page identically to how PRINT USING formats a program screen.
  • COLORed text and images can be printed using _PRINTIMAGE which stretches them to fit the default printer's paper size.
  • LPRINT will only print to the default USB or LPT printer set up in Windows. Keyword not supported in Linux or macOS versions.
  • Note: Printer escape codes starting with CHR$(27) will not work with LPRINT and may produce text printing errors.


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link