SET PRINTER

SET PRINTER

Toggles the printer and controls the printer device

Syntax

      SET PRINTER on | OFF
      SET PRINTER (<lPrinter>)
      SET PRINTER TO [<cPrinter>] [ADDITIVE]

Arguments

<lPrinter> Logical condition by which to toggle the printer

<cPrinter> A device name or an alternate name

Description

This command can direct all output that is not controlled by the @…SAY command and the DevPos() and DevOut() functions to the printer. If specified, the condition <lPrinter> toggles the printer ON if a logical true (.T.) and OFF if a logical false (.F.). If no argument is specified in the command, the alternate file (if one is open) is closed, or the device is reselected and the PRINTER option is turned OFF.

If a device is specified in <cPrinter>, the output will be directed to that device instead of to the PRINTER. A specified device may be a literal string or a variable, as long as the variable is enclosed in parentheses. For a network, do not use a trailing colon when redirecting to a device.

If an alternate file is specified, <cPrinter> becomes the name of a file that will contain the output. If no file extension is specified an extension of .prn will be defaulted to.

If the ADDITIVE clause is specified, the information will be appended to the end of the specified output file. Otherwise, a new file will be created with the specified name (or an existing file will first be cleared) and the information will then be appended to the file. The default is to create a new file.

Examples

      SET PRINTER ON
      SET PRINTER TO LPT1
      ? 25141251 / 362
      SET PRINTER .F.

Compliance

Clipper

Seealso

SET DEVICE, SET CONSOLE, DevOut(), Set()

Advertisements

2 responses to “SET PRINTER

  1. Pingback: Harbour Commands | Viva Clipper !

  2. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s