LPRINT
This page was last modified 12:57, 17 May 2020 by Gdx. Based on work by Rderooy and Mars2000you and others.

Contents

Effect

Used to print and format text and numbers to a printer connected to the standard MSX parallel port.

Contrary to PRINT, you can't shorten LPRINT to "L?" Doing this will cause a very hard to find problem. The listing will look fine, but it will still cause a "Syntax error". In case you have done that you can list the lines to the screen and push the RETURN key on top of the lines to fix these errors.

Syntax

LPRINT USING <ItemFormat>; <Item>;<Item>...

Parameters

<Item> is can be a character string, a expression, a variable or a value to print. All four items types can be mixed freely. Items must be separated by ";". If the last items does not end to ";" CR+LF combination is printed. A comma can replace a ";" to separate the items. In case of "," they are separated by tabulator instead of a space. <Item> can be omitted.

USING <ItemFormat>; is optional. <ItemFormat> is a string that defines how the print next items must be formatted. When USING is used the type of following items usable depends nf specified format.

<Item> and <ItemFormat> are exactly same as with PRINT command. Please see documentation there.

Example

10 ' Initialize Epson compatible printer and select NLQ Sans Serif font:
20 SCREEN ,,,,1:LPRINT CHR$(27);"@";CHR$(27);"k1";

Related to

LFILES, LLIST, LPOS(), PRINT, SCREEN, SPC(), TAB()

Compatibility

MSX-BASIC 1.0 or higher