Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_asearch() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_ASEARCH()

 DESCRIPTION

 The C_ASEARCH() function fills a ClipOn array with record numbers
 matching the expression specified.  Up to 32,000 record numbers can
 be placed in the array and deleted records can be automatically
 excluded or included.  The C_ARELEASE() function can be used to
 release the ClipOn array.  (Refer to Chapter 3 for a complete
 discussion about ClipOn arrays.)

 NOTES

 The numeric reference for the ClipOn array is a pointer to the
 array in memory.  Be careful not to change the value of this
 pointer, or the array will be unaccessible.

 SYNTAX

 C_ASEARCH(expr [,index] [,deletes])

 PARAMETERS

 expr (C) is the character expression to evaluate for each record
 checked in the database to determine if it should be included in
 the array.

 index (L) indicates whether an index file is active and should be
 used to speed the search.  Specify true (.T.) if an index is in use
 by the database and is indexed by the search expression.  A SEEK
 must be done before calling C_ASEARCH() to position at the first
 record matching the search expression.  The search will end when a
 record is found not matching the search expression.  Note that
 using an index is the fastest method for executing C_ASEARCH().  If
 index is not specified, the default of false (.F.) is used.

 deletes (L) indicates whether deleted records should be included or
 excluded from the search.  Specify true (.T.) to include deleted
 records in the search, or false (.F.) to exclude deleted records.
 If the deletes argument is not specified, deleted records are
 excluded (.F.) from the search.

 RETURNS

 C_ASEARCH() returns a numeric reference variable for the ClipOn
 array.  The C_ASIZE() function can be used to determine how many
 records were found and placed in the array.

 EXAMPLES

 use test index test

 seek "VA"             && Use index for fastest method.
 if found()            && Seek to first record for 'VA'.
   aptr = c_asearch("State = 'VA'", .t.)   && Get record numbers for state
 endif                                     && = 'VA', returning reference
 ...
 aptr = c_asearch()        && Get all records
 ...
 aptr = c_asearch("deleted()",.f.,.t.)    && Get all deleted records.


See Also: C_SEARCH() C_AFIND() C_ADECLARE()

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