C5_SET EXCLUSIVE

SET EXCLUSIVE*
 Establish shared or exclusive USE of database files
------------------------------------------------------------------------------
 Syntax

     SET EXCLUSIVE ON | off | <xlToggle>

 Arguments

     ON causes database files to be opened in exclusive (nonshared) mode.

     OFF causes database files to be opened in shared mode.

     <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

     In a network environment, SET EXCLUSIVE determines whether a USE command
     specified without the EXCLUSIVE or SHARED clause automatically opens
     database, memo, and index files EXCLUSIVE.  When database files are
     opened EXCLUSIVE, other users cannot USE them until they are CLOSEd.  In
     this mode, file and record locks are unnecessary.

     When EXCLUSIVE is ON (the default), all database and associated files
     open in a nonshared (exclusive) mode unless the USE command is specified
     with the SHARED clause.  Use EXCLUSIVE only for operations that
     absolutely require EXCLUSIVE USE of a database file, such as PACK,
     REINDEX, and ZAP.

     When EXCLUSIVE is OFF, all files are open in shared mode unless the USE
     command is specified with the EXCLUSIVE clause.  Control access by other
     users programmatically using RLOCK() and FLOCK().

     SET EXCLUSIVE is a compatibility command and not recommended.  It is
     superseded by the EXCLUSIVE and SHARED clauses of the USE command.

     Refer to the "Network Programming" chapter in the Programming and
     Utilities Guide for more information.

 Notes

     .  Error handling: Attempting to USE a database file already
        opened EXCLUSIVE by another user generates a runtime error and sets
        NETERR() to true (.T.).  After control returns to the point of error,
        you can test NETERR() to determine whether the USE failed.

 Files   Library is CLIPPER.LIB.

See Also: FLOCK() NETERR() RLOCK() USE

 

Advertisements

C5_SET EXACT

SET EXACT*
 Toggle exact matches for character strings
------------------------------------------------------------------------------
 Syntax

     SET EXACT on | OFF | <xlToggle>

 Arguments

     ON enforces exact comparison of character strings including length.

     OFF resumes normal character string comparison.

     <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 EXACT determines how two character strings are compared using the
     relational operators (=, >, <, =>, =<).  When EXACT is OFF, strings are
     compared according to the following rules.  assume two character strings
     cLeft and cRight where the expression to test is (cLeft = cRight):

     .  If cRight is a null string (""), return true (.T.).

     .  If LEN(cRight) is greater than LEN(cLeft), return false (.F.).

     .  Otherwise, compare all characters in cRight with cLeft.  If
        all characters in cRight equal cLeft, return true (.T.); otherwise,
        return false (.F.).

     With EXACT ON, all relational operators except the double equal operator
     (==) treat two strings as equal, if they match exactly, excluding
     trailing spaces.  With the double equal operator (==), all characters in
     the string are significant, including trailing spaces.

     SET EXACT is a compatibility command and not recommended.

 Notes

     .  Compatibility: In Clipper, unlike other dialects, SET EXACT
        has no affect on operations other than relational operators.  This
        includes the SEEK and FIND commands.  If you need to seek exact
        matches of character keys, use the example user-defined function
        SeekExact() in the SEEK command reference.

 Examples

     .  These examples show various results of the equal operator (=)
        with SET EXACT:

        SET EXACT OFF
        ? "123" = "12345"            // Result: .F.
        ? "12345" = "123"            // Result: .T.
        ? "123" = ""                 // Result: .T.
        ? "" = "123"                 // Result: .F.
        ? "123" = "123  "            // Result: .F.
        //
        SET EXACT ON
        ? "123" = "12345"            // Result: .F.
        ? "12345" = "123"            // Result: .F.
        ? "123" = ""                 // Result: .F.
        ? "" = "123"                 // Result: .F.
        ? "123" = "123  "            // Result: .T.

 Files   Library is CLIPPER.LIB.

See Also: SEEK



C5_SET ESCAPE

SET ESCAPE
 Toggle Esc as a READ exit key
------------------------------------------------------------------------------
 Syntax

     SET ESCAPE ON | off | <xlToggle>

 Arguments

     ON enables Esc as a READ exit key.

     OFF disables Esc as a READ exit key.

     <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

     If SET ESCAPE is ON, Esc terminates the current READ.  Any changes made
     to the current Get object are lost, and validation with RANGE or VALID
     is bypassed.  When SET ESCAPE is OFF and the user presses Esc, the key
     press is ignored.  With SET KEY, however, you can reassign Esc for
     special handling, regardless of the status of SET ESCAPE.

 Files   Library is CLIPPER.LIB.

See Also: READ READEXIT() SETCANCEL() SET KEY SETKEY()

 

C5_SET EPOCH

SET EPOCH
 Control the interpretation of dates with no century digits
------------------------------------------------------------------------------
 Syntax

     SET EPOCH TO <nYear>

 Arguments

     TO <nYear> specifies the base year of a 100-year period in which all
     dates containing only two year digits are assumed to fall.

 Description

     SET EPOCH is an environment command that determines the interpretation
     of date strings containing only two year digits.  When such a string is
     converted to a date value, its year digits are compared with the year
     digits of <nYear>.  If the year digits in the date are greater than or
     equal to the year digits of <nYear>, the date is assumed to fall within
     the same century as <nYear>.  Otherwise, the date is assumed to fall in
     the following century.

     The default value for SET EPOCH is 1900, causing dates with no century
     digits to be interpreted as falling within the twentieth century.

     Clipper supports all dates in the range 01/01/0100 to 12/31/2999.

 Examples

     .  This example shows the effects of SET EPOCH:

        SET DATE FORMAT TO "mm/dd/yyyy"
        ? CTOD("05/27/1904")            // Result: 05/27/1904
        ? CTOD("05/27/67")              // Result: 05/27/1967
        ? CTOD("05/27/04")              // Result: 05/27/1904
        //
        SET EPOCH TO 1960
        ? CTOD("05/27/1904")            // Result: 05/27/1904
        ? CTOD("05/27/67")              // Result: 05/27/1967
        ? CTOD("05/27/04")              // Result: 05/27/2004

 Files   Library is CLIPPER.LIB.

See Also: CTOD() DATE() DTOC() DTOS() SET CENTURY SET DATE



C5_SET DEVICE

SET DEVICE
 Direct @...SAYs to the screen or printer
------------------------------------------------------------------------------
 Syntax

     SET DEVICE TO SCREEN | printer

 Arguments

     TO SCREEN directs all @...SAYs to the screen and is independent of
     the SET PRINTER and CONSOLE settings.

     TO PRINTER directs all @...SAYs to the device set with SET PRINTER
     TO.  This can include a local printer port, a network spooler, or a
     file.

 Description

     SET DEVICE directs the output of @...SAY commands to either the screen
     or the printer.  When DEVICE is SET TO PRINTER, @...SAY commands are
     sent to the printer and not echoed to the screen.  In addition, @...SAY
     commands observe the current SET MARGIN value.

     When sending @...SAYs to the printer, Clipper performs an automatic
     EJECT whenever the current printhead row position is less than the last
     print row position.  An EJECT resets PCOL() and PROW() values to zero.
     To reset PCOL() and PROW() to new values, use the SETPRC() function.

     To send @...SAYs to a file, use SET PRINTER TO <xcFile> with SET DEVICE
     TO PRINTER.

 Examples

     .  This example directs @...SAYs to the printer:

        SET DEVICE TO PRINTER
        @ 2,10 SAY "Hello there"
        EJECT

     .  This example directs @...SAYs to a file:

        SET PRINTER TO Output.txt
        SET DEVICE TO PRINTER
        @ 10, 10 SAY "File is: Output.txt"
        @ 11, 10 SAY DATE()
        SET PRINTER TO            // Close the output file

        SET DEVICE TO SCREEN

 Files   Library is CLIPPER.LIB.

See Also: @…SAY EJECT PCOL() PROW() SET PRINTER SETPRC()



C5_SET DESCENDING

SET DESCENDING
 Change the descending flag of the controlling order
------------------------------------------------------------------------------
 Syntax

     SET DESCENDING ON | OFF | (<lToggle>)

 Arguments

     ON enables the descending flag.

     OFF disables the descending flag.

     <lToggle> 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.

     Note:  The initial default of this setting depends on whether the
     controlling order was created with DESCENDING as an attribute.

 Description

     SET DESCENDING is functionally equivalent to ORDDESCEND().  Refer to
     this function for more information.

 Examples

     .  The following example illustrates SET DESCENDING.  every order
        can be both ascending and descending:

        USE Customer VIA "DBFCDX"
        INDEX ON LastName TAG Last
        INDEX ON FirstName TAG First DESCENDING

        SET ORDER TO TAG Last
        // last was originally created in ascending order

        // Swap it to descending
        SET DESCENDING ON
        // Last will now be processed in descending order

        SET ORDER TO TAG First
        // First was originally created in descending order

        // Swap it to ascending
        SET DESCENDING OFF
        // First will now be processed in ascending order

 Files   Library is CLIPPER.LIB.

See Also: ORDDESCEND()



C5_SET DELIMITERS

SET DELIMITERS
 Toggle or define GET delimiters
------------------------------------------------------------------------------
 Syntax

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

 Arguments

     ON displays delimiters for GET variables.

     OFF suppresses the delimiter 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.

     TO <cDelimiters> defines a one or two character delimiter.
     Specifying a single character uses the same character as both the
     beginning and ending delimiter.  Specifying two characters uses the
     first as the beginning delimiter and the second as the ending delimiter.

     TO DEFAULT or no delimiters SETs the delimiters to colons which are
     the default delimiters.

 Description

     SET DELIMITERS is a dual purpose command that both defines characters
     used to delimit GETs and toggles the automatic display of delimiters ON
     or OFF.  The @...GET command can display delimiters that surround a Get
     object's display.  If DELIMITERS is ON, the delimiters add two
     characters to the length of the Get object display.

     You can configure the delimiter characters using the TO <cDelimiters>
     clause.  The DEFAULT delimiter character is the colon (:).  When
     specifying delimiters, the beginning and ending delimiter characters can
     be different.  If you wish to suppress either the right, left, or both
     delimiters, use a space instead of the delimiter character.

     Typically, delimiters are unnecessary since GETs display in reverse
     video or enhanced color if INTENSITY is ON.

 Examples

     .  This example SETs DELIMITERS TO a colon and a space for the
        first GET and the square bracket characters for the second:

        LOCAL cVar := SPACE(5), cVar2 := SPACE(5)
        SET DELIMITERS ON

        SET DELIMITERS TO ": "
        @ 1, 0 SAY "Enter" GET cVar
        SET DELIMITERS TO "[]"
        @ 2, 0 SAY "Enter" GET cVar2
        READ

 Files   Library is CLIPPER.LIB.

See Also: @…GET SET INTENSITY