ISPRINTER()
Determine whether LPT1 is ready
Syntax
ISPRINTER() --> lReady
Returns
ISPRINTER() returns true (.T.) if LPT1 is ready; otherwise, it returns false (.F.).
Description
ISPRINTER() is a printer function that determines whether the parallel port (LPT1) is online and ready to print. ISPRINTER() is hardware-dependent and, therefore, only works on IBM BIOS compatible systems.
You can check ISPRINTER() to make sure the printer is ready before you begin a print operation; however, if an error occurs during the print operation, a runtime error is generated.
Examples
. This example tests the parallel port for readiness with up to 25 retries. If the parallel port is ready, the printer operation begins: LOCAL nCount := 0, nTimes := 25, lReady // DO WHILE nCount++ <= nTimes .AND. !(lReady := ; ISPRINTER()) ENDDO // IF lReady REPORT FORM Sales TO PRINTER ELSE ? "Printer not ready..." BREAK ENDIF
Seealso
SET DEVICE, SET PRINTER