Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Guide To CA-Clipper - <b>isprinter()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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

 Files   Library is EXTEND.LIB, source file is SOURCE\SAMPLE\EXAMPLEA.ASM.


See Also: SET DEVICE SET PRINTER

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson