PRINTER NAME |
![]() ![]() ![]() |
The PRINTER NAME statement associates a named printer device with a print unit.
Format
PRINTER NAME {ON print.unit} printer.name {ON ERROR statement(s)} {THEN statement(s)} {ELSE statement(s)}
where
The ON ERROR, THEN and ELSE clauses are all optional.
The ON ERROR clause is executed in the event of a fatal internal error. The error code returned by the STATUS() function will indicate the cause of the error. If this clause is omitted, the program will abort in the event of a fatal error.
The THEN clause is executed if the operation is successful. The STATUS() function will return zero.
The ELSE clause is executed if the printer does not exist. If this clause is omitted, program execution continues after an error.
Example
PRINTER NAME ON 1 "LPT1"
This statement directs output from print unit 1 to a printer named LPT1. |