[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
PRINTSTAT()
Determines the status of a parallel port
------------------------------------------------------------------------------
Syntax
PRINTSTAT([<nPrinter>]) --> nStatus
Argument
<nPrinter> Designates the printer whose status is determined. The
allowed values of 1 to 3 correspond to devices LPT1 to LPT3. The
default is LPT1(1).
Returns
The returned value corresponds to the status of the <nPrinter> selected
printer. The individual bits are defined as follows:
Table 8-2: Printer Bit Status
------------------------------------------------------------------------
Bit Definition
------------------------------------------------------------------------
1 Time out error
2 Not used
3 Not used
4 Transmission error
5 Printer online
6 Out of paper
7 Printer acknowledged
8 Printer not available
------------------------------------------------------------------------
Description
If a printer error occurs, PRINTSTAT() allows you to isolate the error
more precisely. PRINTSTAT() returns information about why an error
occurs.
Example
In this example, the printer status is only queried when the printer is
not ready:
IF .NOT. PRINTREADY(1)
nStatus := PRINTSTAT(1)
IF ISBIT(nStatus, 6) // Test bit 6
? "Paper out!"
ENDIF
ENDIF
See Also:
PRINTREADY()
PRINTINIT()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson