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

  Syntax:

  LOCATE [<scope>] FOR <lCondition>
   [WHILE <lCondition>] [NOOPTIMIZE]

  <scope> is the portion of the current database file in which to
  perform a LOCATE. The default scope is ALL records. Mach SIx supports
  the ALL scope only.

  FOR <lCondition> specifies the next record to LOCATE. Mach SIx will
  optimize any FOR condition that contains one or more active index keys.

  WHILE <lCondition> specifies the set of records meeting the
  condition from the current record until the condition fails.  Mach SIx
  does not support the WHILE condition.

  NOOPTIMIZE, preempts optimization and forces default Clipper
  processing.

  Description: 

  LOCATE is a database command that searches from the top of the scope for
  the first record that matches the specified condition(s). It stops when
  a match is found or the end of the scope is reached.

  If LOCATE is successful, the matching record becomes the current record
  and FOUND() returns true (.T.).  If it is unsuccessful, FOUND() returns
  false (.F.). In this case the record pointer will be at eof() if the
  controlling scope is the default ALL. If the controlling scope is other
  than the default, the record pointer will be at the bottom of the scope.

  Each work area can have its own LOCATE condition.  The condition remains
  active until you execute another LOCATE command in that work area or the
  application terminates.

  LOCATE works with CONTINUE.  Once a LOCATE has been issued, you can
  resume the search from the current record pointer position with
  CONTINUE.


  Example: 

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

  USE claims
  INDEX on amt_paid TAG amt_paid
  INDEX on region TAG region

  // show claims greater than 500,000 by region

  LOCATE for AMT_PAID >= 500000
  DO WHILE FOUND()
    ? "Region: ", region, " Amount: ", amt_paid
    CONTINUE
  ENDDO


See Also: CONTINUE

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