LPRINT$ function

Purpose

Return the name of the printer device used for LPRINT operations.

Syntax

device$ = LPRINT$

Remarks

LPRINT$ returns the name of the currently attached printer device used by the LPRINT statement.  If there is no attached device, an empty string is returned.

LPRINT$ is primarily used to detect if an LPRINT ATTACH operation was successful.

See also

LPRINT, LPRINT ATTACH, LPRINT CLOSE, LPRINT FLUSH, LPRINT FORMFEED, XPRINT, XPRINT ATTACH

Example

ERRCLEAR

LPRINT ATTACH "LPT3"

IF ERR <> 0 OR LPRINT$ = "" THEN PRINT "Printer connection failed"