Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>descend()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DESCEND()
 Create a descending index key value
------------------------------------------------------------------------------
 Syntax

     DESCEND(<exp>) --> ValueInverted

 Arguments

     <exp> is any valid expression of character, date, logical, or
     numeric type.  Memo type is treated in the same way as character type.

 Returns

     DESCEND() returns an inverted expression of the same data type as the
     <exp>, except for dates which return a numeric value.  A DESCEND() of
     CHR(0) always returns CHR(0).

 Description

     DESCEND() is a conversion function that returns the inverted form of the
     specified expression to be used with INDEX to create descending order
     indexes.  Specify that part of the index expression you want to be
     descending as the DESCEND() argument.  To subsequently perform a lookup
     with SEEK, specify DESCEND() in the search expression.

 Notes

     .  The preferred way to create a descending index is to use the
        DESCENDing clause of the INDEX command.  Using DESCENDING is the same
        as specifying the DESCEND() function, but without the performance
        penalty during index updates.  If you create a DESCENDING index, you
        won't need to use the DESCEND() function during a SEEK.  DESCENDING
        is an attribute of the (.ntx) file, where it is stored and used for
        REINDEXing purposes.

 Examples

     .  This example uses DESCEND() in an INDEX expression to create a
        descending order date index:

        USE Sales NEW
        INDEX ON DESCEND(OrdDate) TO SalesDate

        Later, use DESCEND() to SEEK on the descending index:

        SEEK DESCEND(dFindDate)

     .  This example illustrates how to create a descending order
        index using more than one data type.  Here, the key is created using
        the concatenation of date and character fields after the appropriate
        type conversion has taken place.  This example uses STR() instead of
        DTOS() since DESCEND() of a date returns a numeric value:

        USE Sales NEW
        INDEX ON STR(DESCEND(SaleDate)) + Salesman TO LastSale

 Files:  Library is EXTEND.LIB.

See Also: FIND* INDEX SEEK

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