Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>set printer</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SET PRINTER


Syntax:     SET PRINTER TO [<device>/<file>/(<expC>)]

Purpose:    To determine the destination of printed output.

Arguments:  <device> specifies where printed output will be sent.
            This may be either a network or the local device.  For some
            networks, the work station's printer should first be
            redirected to the file server (usually by running the
            network spooler program).

            <file> creates or truncates the specified file, and
            writes all subsequent printed output to the file.  This
            includes @...SAYs, if they have been redirected to the
            printer using SET DEVICE.  If you do not specify a file
            extension, Clipper appends a (.prn) extension to the
            filename.

            SET PRINTER TO with no arguments issues a DOS close request
            to the specified device or file and resets the default
            destination.

            SETting PRINTER TO a non-existing device creates a file with
            the name of the device.

Usage:      The default device is PRN.  Other device names include LPT1,
            LPT2, LPT3 (all parallel ports), COM1, and COM2 (serial
            ports).

            Note: When specifying device names, be sure not to
            specify a trailing colon.

            This capability has several uses:

            .  Swap ports for managing multiple printers.

            .  Direct output to a file for printing later or transfer to
               a remote computer via telecommunications.

            .  Empty the printer spooler and reset the default device.

Library:    CLIPPER.LIB


----------------------------------- Examples -------------------------------

   This example directs printer output to LPT1 and empties the print
   spooler upon completion:

   SET PRINTER TO LPT1
   <Printing statements>...
   SET PRINTER TO                && Empties print spooler.


   The following example sends printer output to a text file overwriting
   the existing file:

   SET PRINTER TO Prnfile.txt
   SET DEVICE TO PRINT
   SET PRINT ON

   @ 0, 0 SAY "This goes to Prnfile.txt"
   ? "So will this!"

   SET DEVICE TO SCREEN
   SET PRINT OFF
   SET PRINTER TO                && Closes file.


See Also: @...SAY...GET SET DEVICE SET PRINT

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