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

  Syntax:

  SEARCH FOR <lCondition> TO <aVar>

  FOR <lCondition> specifies a logical condition to limit the record
  numbers stored into the target array.  Mach SIx will optimize any FOR
  condition that contains one or more active index keys.

  TO <aVar> specifies the name of target array to store the resulting record
  numbers into.

  Description:

  The SEARCH FOR command fills an array with record numbers for records
  meeting a logical FOR condition.  Record numbers will always be stored
  into the target array in natural record order.  If Mach SIx is unable to
  optimize the FOR condition, a top down scan of the database will be used
  to fill the target array.

  ---------------------------------| EXAMPLE |--------------------------------
  /*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  *  Demonstrates the SEARCH command                                        *
  *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/

  #include "SIXCDX.CH"
  #include "MACHSIX.CH"

  Local nCount, nRecs, aTemp

  USE Account VIA "SIXCDX"  // Structural index ACCOUNT.CDX opened
                            // automatically
  CLEAR SCREEN
  ? "Example of SEARCH command."
  ?

  // Search command optimized using state index.
  SEARCH FOR account->STATE = "CA" TO aTemp
  nRecs:=len( aTemp )

  ? "Record", "First", "Last"
  FOR nCount:=1 to nRecs
    GOTO aTemp[ nCount ]
    ? recno(), field->FIRST, field->LAST
  NEXT nCount
  CLOSE ALL


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