SET CURSOR

SET CURSOR

Toggle the screen cursor on or off

Syntax

      SET CURSOR ON | off | <xlToggle>

Arguments

ON enables the cursor display.

OFF disables the cursor display.

<xlToggle> is a logical expression that must be enclosed in parentheses. A value of true (.T.) is the same as ON, and a value of false (.F.) is the same as OFF.

Description

SET CURSOR toggles the screen cursor on or off. When the CURSOR is OFF, keyboard entry and screen display are unaffected. The cursor is merely hidden and data entry may still be accomplished without the cursor being visible. ROW() and COL() are updated as if the cursor were visible.

This command suppresses the cursor while the screen is being painted. Ideally, the only time the cursor shows in a production program is when the user is editing GETs, MEMOEDIT(), or some kind of line edit.

Examples

      .  This example shows a typical use of SET CURSOR:

      LOCAL lAnswer := .F.
      @ 24, 0
      @ 24, 15 SAY "Do you want to QUIT? [Y/N]";
         GET lAnswer;
         PICTURE "Y"
      SET CURSOR ON
      READ
      SET CURSOR OFF

Seealso

COL(), ROW(), SET CONSOLE, SETCURSOR(), SETPOS()

Advertisements

? | ??

?|??

Display one or more values to the console

Syntax

       ? | ?? [<exp list>]

Arguments

<exp list> is a list of values to display and can be any combination of data types, including memo.

If you specify no argument and use the ? command, a carriage return/linefeed is sent to the console. If you use the ?? command without arguments, nothing happens.

Description

? and ?? are console commands that display the results of one or more expressions, separated by a space, to the console. These commands are also command synonyms for the QOUT() and QQOUT() functions, respectively.

Although functionally similar, ? and ?? differ slightly. ? sends a carriage return/linefeed to the console before displaying the results of the expression list. ?? displays output at the current screen cursor or printhead position. This lets you use successive ?? commands to display output to the same line.

A ? or ?? command locates the cursor or printhead one position to the right of the last character displayed. If SET PRINTER is OFF, ROW() and COL() are updated to reflect the new cursor position. If SET PRINTER is ON, PROW() and PCOL() are updated with the new printhead position.

If output from a ? or ?? command reaches the edge of the screen as reported by MAXCOL(), it wraps to the next line. If the output reaches the bottom of the screen as reported by MAXROW(), the screen scrolls up one line.

You can echo output from the ? or ?? commands to the printer by specifying a SET PRINTER ON command before beginning output. You can echo output from both of these commands to a text file using SET ALTERNATE TO <xcFile> to create the file, and SET ALTERNATE ON to begin echoing to the file. Like other console commands, SET CONSOLE OFF suppresses the display to the screen without affecting output to the printer or text file.

To format any expression specified, use TRANSFORM() or a user-defined function. If you need to pad a variable length value for column alignment, use any of the PAD() functions to left-justify, right- justify, or center the value. See the examples below.

Examples

       .  This example prints a record from a database file using ? and
          ?? commands with PADR() to ensure column alignment:
       LOCAL nPage := 0, nLine := 99
       USE Salesman INDEX Salesman NEW
       SET PRINTER ON
       SET CONSOLE OFF
       DO WHILE !EOF()
          IF nLine > 55
             IF nPage != 0
                EJECT
             ENDIF
             ? PADR("Page", LTRIM(STR(nPage++)), 72)
             ?? DTOC(DATE())
             ?
             ?
             ? PADC("Sales Listing", 79)
             ?
             nLine := 5
          ENDIF
          ? Name, Address, PADR(RTRIM(City) + "," ;
                + State, 20), ZipCode
          nLine++
          SKIP
       ENDDO
       SET CONSOLE ON
       SET PRINTER OFF
       CLOSE Salesman

Seealso

@…SAY, PAD(), QOUT(), SET ALTERNATE, SET CONSOLE, SET PRINTER

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 ALTERNATE

SET ALTERNATE

Toggle and echos output to an alternate file

Syntax

      SET ALTERNATE to <cFile> [ADDITIVE]
      SET ALTERNATE  on | OFF | (<lAlter>)

Arguments

<cFile> Name of alternate file.

<lAlter> Logical expression for toggle

Description

This command toggles and output console information to the alternate file <cFile>, provided that the command is toggled on or the condition <lAlter> is set to a logical true (.T.). If <cFile> does not has a file extension, .txt will be assumed. The file name may optionally have a drive letter and/or directory path. If none is specified, the current drive and directory will be used. If the ALTERNATE file is created but no ALTERNATE ON command is issued, nothing will be echoed to the file. If ADDITIVE clause is used, then the information will be appended to the existing alternate file. Otherwise, a new file will be created with the specified name (or an existing one will be overwritten) and the information will be appended to the file. The default is to create a new file. A SET ALTERNATE TO command will close the alternate file

Examples

      SET ALTERNATE TO test.txt
      SET ALTERNATE ON
      ? 'Harbour'
      ? "is"
      ? "Power"
      SET ALTERNATE TO
      SET ALTERNATE OFF

Compliance

Clipper

Seealso

CLOSE, SET PRINTER, SET CONSOLE, Set()

C5 UI Global Settings

C5 User Interface Global Settings :

SET CENTURY :

Modify the date format to include or omit century digits

SET CENTURY on | OFF | <xlToggle>

SET COLOR* :

Define screen colors

SET COLOR | COLOUR TO [[<standard>]
    [,<enhanced>] [,<border>] [,<background>]
    [,<unselected>]] | (<cColorString>)

SET CONFIRM :

Toggle required exit key to terminate GETs

SET CONFIRM on | OFF | <xlToggle>

SET CONSOLE :

Toggle console display to the screen

SET CONSOLE ON | off | <xlToggle>

SET CURSOR :

Toggle the screen cursor on or off

SET CURSOR ON | off | <xlToggle>

SET DATE :

Set the date format for input and display

SET DATE FORMAT [TO] <cDateFormat>
SET DATE [TO] AMERICAN | ansi | british | french
    | german | italian | japan | usa

SET DECIMALS :

Set the number of decimal places displayed

SET DECIMALS TO [<nDecimals>]

SET DELIMITERS :

Toggle or define GET delimiters

SET DELIMITERS on | OFF | <xlToggle>
SET DELIMITERS TO [<cDelimiters> | DEFAULT]

SET DEVICE :

Direct @…SAYs to the screen or printer

SET DEVICE TO SCREEN | printer

SET EPOCH :

Control the interpretation of dates with no century digits

SET EPOCH TO <nYear>

SET FIXED :

Toggle fixing of the number of decimal digits displayed

SET FIXED on | OFF | <xlToggle>

SETBLINK() :

Toggle asterisk (*) interpretation in SET COLOR

SETBLINK([<lToggle>]) --> lCurrentSetting

SETCOLOR() :

Return the current colors and optionally set new colors

SETCOLOR([<cColorString>]) --> cColorString

SETCURSOR() :

Set the cursor shape

SETCURSOR([<nCursorShape>]) --> nCurrentSetting

SETMODE() :

Change display mode to specified number of rows and columns

SETMODE(<nRows>, <nCols>) --> lSuccess

SETPOS() :

Move the cursor to a new position

SETPOS(<nRow>, <nCol>) --> NIL

C5_SET CONSOLE

SET CONSOLE
 Toggle console display to the screen
------------------------------------------------------------------------------
 Syntax

     SET CONSOLE ON | off | <xlToggle>

 Arguments

     ON displays the output of console commands on the screen.

     OFF suppresses the screen display of console commands.

     <xlToggle> is a logical expression that must be enclosed in
     parentheses.  A value of true (.T.) is the same as ON, and a value of
     false (.F.) is the same as OFF.

 Description

     SET CONSOLE determines whether or not console commands send output to
     the screen.  Console commands are commands that display to the screen
     without reference to row and column position.  In addition to sending
     output to the screen, console commands can simultaneously send output to
     the printer and/or a DOS text file.  Output is sent to the printer using
     the TO PRINTER clause common to many console commands, or with the SET
     PRINTER ON command.  Output is sent to a file using the TO FILE clause,
     SET ALTERNATE, or SET PRINTER TO.

     With CONSOLE ON, console commands display to the screen.  With CONSOLE
     OFF, the screen display of console commands is suppressed, but the
     echoing of output to either a file or the printer is unaffected.  This
     lets you send the output of console commands such as REPORT and LABEL
     FORM to the printer without the screen display--a common occurrence.

 Notes

     .  Keyboard input: For console commands that accept input
        (including ACCEPT, INPUT, and WAIT), SET CONSOLE affects the display
        of the prompts as well as the input areas.  As a consequence, a SET
        CONSOLE OFF before one of these commands will not only prevent you
        from seeing what you type, but will also prevent the display of the
        message prompt.

     .  Full-screen commands: Full-screen commands such as @...SAY
        display to the screen independent of the current CONSOLE SETting.
        For this category of output commands, device control is performed
        using SET DEVICE to control whether output goes to the screen or
        printer, and SET PRINTER TO echo output to a file.

 Examples

     .  This example uses REPORT FORM to output records to the printer
        while suppressing output to the screen:

        USE Sales NEW
        SET CONSOLE OFF
        REPORT FORM Sales TO PRINTER

        SET CONSOLE ON

 Files   Library is CLIPPER.LIB.


See Also: SET DEVICE

 

C5 Commands

 ?|??            Display one or more values to the console
 @...BOX         Draw a box on the screen
 @...CLEAR       Clear a rectangular region of the screen
 @...GET         Create a new Get object and display it
 @...PROMPT      Paint a menu item and define a message
 @...SAY         Display data at a specified screen or printer row and column
 @...TO          Draw a single- or double-line box
 ACCEPT*         Place keyboard input into a memory variable
 APPEND BLANK    Add a new record to the current database file
 APPEND FROM     Import records from a database (.dbf) file or ASCII text file
 AVERAGE         Average numeric expressions in the current work area
 CALL*           Execute a C or Assembler procedure
 CANCEL*         Terminate program processing
 CLEAR ALL*      Close files and release public and private variables
 CLEAR GETS      Release Get objects from the current GetList array
 CLEAR MEMORY    Release all public and private variables
 CLEAR SCREEN    Clear the screen and return the cursor home
 CLEAR TYPEAHEAD Empty the keyboard buffer
 CLOSE           Close a specific set of files
 COMMIT          Perform a solid-disk write for all active work areas
 CONTINUE        Resume a pending LOCATE
 COPY FILE       Copy a file to a new file or to a device
 COPY STRUCTURE  Copy the current .dbf structure to a new database (.dbf) file
 COPY STRU EXTE  Copy field definitions to a .dbf file
 COPY TO         Export records to a database (.dbf) file or ASCII text file
 COUNT           Tally records to a variable
 CREATE          Create an empty structure extended (.dbf) file
 CREATE FROM     Create a new .dbf file from a structure extended file
 DELETE          Mark records for deletion
 DELETE FILE     Remove a file from disk
 DELETE TAG      Delete a tag
 DIR*            Display a listing of files from a specified path
 DISPLAY         Display records to the console
 EJECT           Advance the printhead to top of form
 ERASE           Remove a file from disk
 FIND*           Search an index for a specified key value
 GO              Move the pointer to the specified identity
 INDEX           Create an index file
 INPUT*          Enter the result of an expression into a variable
 JOIN            Create a new database file by merging from two work areas
 KEYBOARD        Stuff a string into the keyboard buffer
 LABEL FORM      Display labels to the console
 LIST            List records to the console
 LOCATE          Search sequentially for a record matching a condition
 MENU TO         Execute a lightbar menu for defined PROMPTs
 NOTE*           Place a single-line comment in a program file
 PACK            Remove deleted records from a database file
 QUIT            Terminate program processing
 READ            Activate full-screen editing mode using Get objects
 RECALL          Restore records marked for deletion
 REINDEX         Rebuild open indexes in the current work area
 RELEASE         Delete public and private memory variables
 RENAME          Change the name of a file
 REPLACE         Assign new values to field variables
 REPORT FORM     Display a report to the console
 RESTORE         Retrieve memory variables from a memory (.mem) file
 RESTORE SCREEN* Display a saved screen
 RUN             Execute a DOS command or program
 SAVE            Save variables to a memory (.mem) file
 SAVE SCREEN*    Save the current screen to a buffer or variable
 SEEK            Search an order for a specified key value
 SELECT          Change the current work area
 SET ALTERNATE   Echo console output to a text file
 SET BELL        Toggle sounding of the bell during full-screen operations
 SET CENTURY     Modify the date format to include or omit century digits
 SET COLOR*      Define screen colors
 SET CONFIRM     Toggle required exit key to terminate GETs
 SET CONSOLE     Toggle console display to the screen
 SET CURSOR      Toggle the screen cursor on or off
 SET DATE        Set the date format for input and display
 SET DECIMALS    Set the number of decimal places to be displayed
 SET DEFAULT     Set the CA-Clipper default drive and directory
 SET DELETED     Toggle filtering of deleted records
 SET DELIMITERS  Toggle or define GET delimiters
 SET DESCENDING  Change the descending flag of the controlling order
 SET DEVICE      Direct @...SAYs to the screen or printer
 SET EPOCH       Control the interpretation of dates with no century digits
 SET ESCAPE      Toggle Esc as a READ exit key
 SET EXACT*      Toggle exact matches for character strings
 SET EXCLUSIVE*  Establish shared or exclusive USE of database files
 SET FILTER      Hide records not meeting a condition
 SET FIXED       Toggle fixing of the number of decimal digits displayed
 SET FORMAT*     Activate a format when READ is executed
 SET FUNCTION    Assign a character string to a function key
 SET INDEX       Open one or more order bags in the current work area
 SET INTENSITY   Toggle enhanced display of GETs and PROMPTs
 SET KEY         Assign a procedure invocation to a key
 SET MARGIN      Set the page offset for all printed output
 SET MEMOBLOCK   Change the block size for memo files
 SET MESSAGE     Set the @...PROMPT message line row
 SET OPTIMIZE    Change the setting that optimizes using open orders
 SET ORDER       Select the controlling order
 SET PATH        Specify the CA-Clipper search path for opening files
 SET PRINTER     Toggle echo of output to printer or set the print destination
 SET PROCEDURE*  Compile procedures and functions into the current object file
 SET RELATION    Relate two work areas by a key value or record number
 SET SCOPE       Change the boundaries for scoping keys in controlling order
 SET SCOPEBOTTOM Change bottom boundary for scoping keys in controlling order
 SET SCOPETOP    Change top boundary for scoping keys in controlling order
 SET SCOREBOARD  Toggle the message display from READ or MEMOEDIT()
 SET SOFTSEEK    Toggle relative seeking
 SET TYPEAHEAD   Set the size of the keyboard buffer
 SET UNIQUE*     Toggle inclusion of non-unique keys into an index
 SET WRAP*       Toggle wrapping of the highlight in menus
 SKIP            Move the record pointer to a new position
 SORT            Copy to a database (.dbf) file in sorted order
 STORE*          Assign a value to one or more variables
 SUM             Sum numeric expressions and assign results to variables
 TEXT*           Display a literal block of text
 TOTAL           Summarize records by key value to a database (.dbf) file
 TYPE            Display the contents of a text file
 UNLOCK          Release file/record locks set by the current user
 UPDATE          Update current database file from another database file
 USE             Open an existing database (.dbf) and its associated files
 WAIT*           Suspend program processing until a key is pressed
 ZAP             Remove all records from the current database file