Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Foxlib v1.0 - <b>lptinit</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
LPTINIT

Syntax:                 LPTINIT

Use:                    To initialize the line printer (LPT).

Parameters:             LPT0 for lpt1, LPT1 for lpt2, and LPT2 for lpt3.

Returns:                The first character in the sending parameter will
                        have the status of the line printer.  If you did not
                        pass the parameter correctly (e.g. FOXLIB =
                        "ZPT0"), your sending parameter will be unchanged.

Example:                . load c:\FOXLIB\lptinit
                        . FOXLIB = "LPT0"
                        . call lptinit with FOXLIB
                        . ?asc(substr(FOXLIB,1,1))
                        144
                        . rele modu lptinit

                        From this example, the printer status for LPT1 after
                        initialization is ready to print.

                        Below is a table of possible outcomes:

                        0 = Initialization successful
                        8 = Offline
                        40 = Out of paper
                        72 = I/O error
                        144 = Printer ready
                        200 = Printer power off

                        The above values are only valid with IBM and EPSON
                        compatible printers.  If you have a different type
                        of printer, you may be able to determine the value
                        specific to your printer.  If you are using a non-
                        compatible printer, run LPTINIT under different
                        conditions (e.g. printer on, printer not turned on,
                        etc.).  The results you obtain may allow you to
                        build a table of outcomes for your particular
                        printer.  When you test LPTINIT using a non-
                        IBM/EPSON compatible printer, make sure all of your
                        FOX application files are closed.  Otherwise, you
                        may get unwanted results!

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