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()

SET PATH

SET PATH

Specifies a search path for opening files

Syntax

      SET PATH TO [<cPath>]

Arguments

<cPath> Search path for files

Description

This command specifies the search path for files required by most commands and functions not found in the current drive and directory. This pertains primarily, but not exclusively, to databases, indexes, and memo files, as well as to memory, labels and reports files. The search hierarchy is: 1 Current drive and directory, 2 The SET DEFAULT path; 3 The SET PATH path.

Examples

      SET PATH TO C:\harbour\test

Compliance

Clipper

Seealso

SET DEFAULT, CurDir(), Set()

SET MESSAGE

SET MESSAGE

Establishes a message row for @…PROMPT command

Syntax

      SET MESSAGE TO [<nRow> [CENTER]]

Arguments

<nRow> Row number to display the message

Description

This command is designed to work in conjunction with the MENU TO and @…PROMPT commands. With this command, a row number between 0 and MaxRow() may be specified in <nRow>. This establishes the row on witch any message associated with an @…PROMPT command will appear.

If the value of <nRow> is 0, all messages will be suppressed. All messaged will be left-justifies unless the CENTER clause is used. In this case, the individual messages in each @…PROMPT command will be centered at the designated row (unless <nRow> is 0). All messages are independent; therefore, the screen area is cleared out by the centered message will vary based on the length of each individual message.

Specifying no parameters with this command set the row value to 0, witch suppresses all messages output. The British spelling of CENTRE is also supported.

Examples

      See tests/menutest.prg

Compliance

Clipper

Seealso

Set(), SET WRAP, @…PROMPT, MENU TO

SET INTENSITY

SET INTENSITY

Toggles the enhanced display of PROMPT’s and GETs.

Syntax

      SET INTENSITY  ON | off | (<lInte>)

Arguments

<lInte> Logical expression for toggle command

Description

This command set the field input color and @…PROMPT menu color to either highlighted (inverse video) or normal color. The default condition is ON (highlighted).

Examples

      SET INTENSITY ON

Compliance

Clipper

Seealso

@…GET, @…PROMPT, @…SAY, Set()

SET FIXED

SET FIXED

Category

Set the number of decimal position to be displayed

Syntax

      SET FIXED on | OFF | (<lFixed>)

Arguments

<lFixed> Logical expression for toggle

Description

This command activates a system wide fixed placement of decimals places shown for all numeric outputs. If the value of <lFixed> is a logical true (.T.), FIXED will be turned ON; otherwise it will be turned OFF.

When SET DECIMALS OFF is used, the following rules apply to the number of decimal placed displayed.

       Addition         Same as operand with the greatest 
                        number of decimal digits
       Subtraction      Same as operand with the greatest 
                        number of decimal digits
       Multiplication   Sum of operand decimal digits
       Division         Determined by SET DECIMAL TO
       Exponential      Determined by SET DECIMAL TO
       Log()            Determined by SET DECIMAL TO
       Exp()            Determined by SET DECIMAL TO
       Sqrt()           Determined by SET DECIMAL TO
       Val()            Determined by SET DECIMAL TO

Examples

      SET FIXED ON
      ? 25141251 / 362
      SET FIXED OFF

Compliance

Clipper

Seealso

SET DECIMALS, Exp(), Log(), Sqrt(), Val(), Set()

SET EPOCH

SET EPOCH

Specify a base year for interpreting dates

Syntax

      SET EPOCH TO <nEpoch>

Arguments

<nEpoch> Base Century.

Description

This command sets the base year value for dates that have only two digits. The default setting is 1900. Dates between 0100-01-01 and 2999-12-31 are fully supported.

Examples

      SET EPOCH TO 2000

Compliance

Clipper

Seealso

SET DATE, SET CENTURY, CToD(), Date(), DToC(), Set()

SET DEVICE

SET DEVICE

Directs all @…SAY output to a device.

Syntax

      SET DEVICE TO [printer | SCREEN ]

Arguments

None.

Description

This command determines whether the output from the @…SAY command and the DevPos() and DevOut() function will be displayed on the printer.

When the device is set to the PRINTER, the SET MARGIN value adjusts the position of the column values accordingly. Also, an automatic page eject will be issued when the current printhead position is less than the last printed row. Finally, if used in conjunction with the @…GET commands, the values for the GETs will all be ignored.

Examples

      SET DEVICE TO SCREEN
      ? 25141251 / 362
      SET DEVICE TO PRINTER
      SET PRINTER TO LPT1
      ? 214514.214 / 6325
      SET PRINTER OFF
      SET DEVICE TO SCREEN

Compliance

Clipper

Seealso

@…SAY, SET PRINTER, SetPRC(), Set()

SET DEFAULT

SET DEFAULT

Establishes the Harbour search drive and directory.

Syntax

      SET DEFAULT TO [<cPath>]

Arguments

<cPath> Drive and/or path.

Description

This command changes the drive and directory used for reading and writing database, index, memory, and alternate files. Specifying no parameters with this command will default the operation to the current logged drive and directory.

Examples

      SET DEFAULT TO C:\temp

Compliance

Clipper

Seealso

SET PATH, CurDir(), Set()

SET DATE

SET DATE

Assigns a date format or chooses a predefined date data set.

Syntax

      SET DATE FORMAT [TO] <cFormat>

      SET DATE [TO] [ANSI / BRITISH / FRENCH / GERMAN 
      / ITALIAN / JAPAN / USA / AMERICAN]

Arguments

<cFormat> Keyword for date format

Description

This command sets the date format for function display purposes. If specified, <cFormat> may be a customized date format in which the letters d, m and y may be used to design a date format. The default is an AMERICAN date format; specifying no parameters will set the date format to AMERICAN. Below is a table of the various predefined dates formats.

       Syntax         Date Format
       ------------   -----------  
       ANSI           yy.mm.dd
       BRITISH        dd/mm/yy
       FRENCH         dd/mm/yy
       GERMAN         dd.mm.yy
       ITALIAN        dd-mm-yy
       JAPAN          yy.mm.dd
       USA            mm-dd-yy
       AMERICAN       mm/dd/yy

Examples

      SET DATE JAPAN
      ? Date()
      SET DATE GERMAN
      ? Date()

Compliance

Clipper

Seealso

SET DATE, SET EPOCH, CToD(), Date(), DToC(), Set()

SET CONSOLE

SET CONSOLE

Toggle the console display

Syntax

      SET CONSOLE ON | off | (<lConsole>)

Arguments

<lConsole> Logical expression for toggle command

Description

This command turns the screen display either off or on for all screens display other then direct output via the @…SAY commands or the <-> DevOut() function.

If <lConsole> is a logical true (.T.), the console will be turned ON; otherwise, the console will be turned off.

Examples

      SET CONSOLE ON
      ? Date()
      SET CONSOLE OFF
      ? Date()

Compliance

Clipper

Seealso

SET DEVICE, Set()