{{fbdoc item="title" value="LPRINT"}}----
Writes text to the default printer.

{{fbdoc item="syntax"}}##
	**Lprint**  [ [[KeyPgPrintusing|Using]] //formatstring//,] [//expressionlist//] [(, | ;)] ...
##
{{fbdoc item="param"}}
	##//formatstring//##
		String specifying the output format.
	##//expressionlist//##
		List of variables to output according to the specified format.

{{fbdoc item="desc"}}
	Prints ##//expressionlist//## to the printer attached to the parallel port LPT1, or if it does not exist, to the default printer.  To print to a printer different from the default one, use ##[[KeyPgOpenLpt|OPEN LPT]]##.
	
	The ##[[KeyPgPrintusing|Using]]## clause formats ##//expressionlist//## according to ##//formatstring//##.  Except an UDT, any data type can be passed to **##Lprint##** ##//expressionlist##//, expressions do not need to be first converted to strings.
	
	Using a comma (##,##) as separator or in the end of the ##//expressionlist//## will place the cursor in the next column (every 14 characters), using a semi-colon (##;##) won't move the cursor. If neither of them are used in the end of the ##//expressionlist//##, then a new-line will be printed.
	
	Some printers will not print at all until a ##[[KeyPgChr|Chr]](12)## (End of Page) character is printed.
	
	Internally, ""FreeBASIC"" uses the special file number ##-1## for printing using **##Lprint##**.  This file number may be safely closed using ##[[KeyPgClose|Close]] -1##.  The next use of **##Lprint##** will automatically reopen it as needed.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/hardware/lprint.bas"}}%%(freebasic)
'' Compile with -lang fblite or qb

#lang "fblite"

'' new-line
LPrint "Hello World!"

'' no new-line
LPrint "Hello"; "World"; "!";

LPrint

'' column separator
LPrint "Hello!", "World!"

'' end of page
LPrint Chr$(12)
%%

{{fbdoc item="diff"}}
	- None

{{fbdoc item="lang"}}
	- ##**Lprint**## is not supported in the //[[CompilerOptlang|-lang fb]]// dialect. In this dialect the printer must be properly opened with ##[[KeyPgOpenLpt|Open LPT]]## and ##[[KeyPgPrintPp|Print #]]## must be used to print.

{{fbdoc item="see"}}
	- ##[[KeyPgOpenLpt|Open LPT]]##
	- ##[[KeyPgPrint|Print]]##
	- ##[[KeyPgPrint|?]]##
	- ##[[KeyPgPrintPp|Print #]]##
	- ##[[KeyPgPrintPp|? #]]##
	- ##[[KeyPgWrite|Write]]##

{{fbdoc item="back" value="CatPgMisc|Miscellaneous"}}