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>sort</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  SORT

  Syntax:

  SORT [TO <(file)>] [ON <fields,...>]  ;
  [FOR <for>]                           ;
  [WHILE <while>]                       ;
  [NEXT <next>]                         ;
  [RECORD <rec>]                        ;
  [REST]                                ;
  [ALL]                                 ;
  [USECURRENT]                          ;
  [NOOPTIMIZE]

  Generally, this command works the same way as it does in Clipper.  The
  only difference being the USECURRENT clause which allows you to keep
  an index active during the copy out/sort procedure.  This is most impor-
  tant for conditional indexes, allowing you to create a new sorted table
  with only records that match the index condition.

  NOOPTIMIZE, preempts optimization and forces default Clipper processing.

  Example:

    // This program demonstrates a sort based on a conditional index.

    #include "SIXCDX.CH"

    // Open up the TEST database
    USE TEST VIA "SIXCDX"

    // Create a conditional index to use as a base for the sort
    INDEX ON LAST TO TEMP FOR SALARY < 100000

    // Show that we're sorting
    ? "Sorting..."

    // Now sort to a new database file
    SORT TO sorttest ON last,first USECURRENT
    USE SORTTEST
    Browse()



See Also: Sx_SortOption()

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