Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>sx_descend():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Sx_Descend():

  Syntax:  Sx_Descend( [[nTagNo | cTagName,] nOrder | cIndexName] )

           nTagNo     = Position of tag within compound index file
           cTagName   = Name of the tag
           nOrder     = Position of index in list of indexes
           nIndexName = Name of the index

  Returns:  NIL

  Description:  Switches reads from the currently active or specified index
                file between ASCENDING and DESCENDING order.  This does not
                modify the index on the disk at all, but simply allows you
                to make an ASCENDING index behave as if it were created with
                the DESCENDING clause on the fly, without rebuilding the
                index.

    CAVEAT:  If used on an index that was built with the UNIQUE clause, be
             advised that inverting it with Sx_Descend() will not result in
             the same index keys being included in the index as would be
             the case if the index were originally created with the UNIQUE
             and DESCEND clauses.  This is because, in ascending order, the
             duplicate key with the LOWEST record number will be added into
             the UNIQUE index.  However, if the unique index is created with
             the DESCEND clause, the duplicate key with the HIGHEST record
             number is the one that will be added into the index.

    NOTE:  This function is NOT supported under SIXNTX.

  Example:

    #include "SIXNSX.CH"

    USE test VIA "SIXNSX"               // Open the file
    INDEX ON test->LAST TAG LAST        // Create a tag called LAST

    // View records in current (ASCENDING) order
    Browse()

    // Now, invert the index (to DESCENDING order) for the next browse...
    Sx_Descend()
    Browse()

    // Create another index tag in DESCENDING order...
    INDEX ON test->SALARY TAG SALARY DESCEND

    // View records in current (DESCENDING) order
    Browse()

    // Now, invert the index (to ASCENDING order) for the next browse...
    Sx_Descend()
    Browse()



See Also: INDEX

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