Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>printstat()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PRINTSTAT()

Syntax:     PRINTSTAT([<expN>])

Arguments:  <expN> denotes which printer to check.  The values 1 to 3
            correspond to devices LPT1:" to LPT3:.

Returns:    A numeric value.
            The value returned corresponds to the status of the printer
            selected.

            Table of the error codes BIT        76543210

            Time out error                     (       1)
            transfer error                     (    1   )
            printer on line                    (   1    )
            end of paper error                 (  1     )
            acknowledged                       ( 1      )
            not busy                           (1       )

Usage:      This function can be used to pin point an error more
            accurately when it has occurred.  PRINTSTAT() can supply
            detailed information about why an error has occurred.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   * The printer status in the example will only
            * be scanned when the printer is ready.
            IF .NOT. PRINTREADY(1)

               status = PRINTSTAT(1)

               IF ISBIT(status,3)               && Test bit 3
                  ? "Out of paper."
               ENDIF
            ENDIF



See Also: PRINTINIT() PRINTREADY()

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