Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FAST TEXT SEARCH for Clipper v.2.0 - <b>cftsnext( <cftshandle> )</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   CftsNext( <CFTShandle> )

       Purpose

   Assuming that a CftsSet() call has occurred immediately preceding 
   the first call to CftsNext() for a given search, this function 
   performs the actual 'find' operation using the index. The first call 
   returns the record number of the first hit, the second of the second 
   hit, etc. When all possible hits have been returned, the function 
   returns zero.

       Parameters

   <CFTShandle> is an integer referring to a CFTS index.

       Return Value

   Returns the record number of the next possible match. If zero, 
   there are no more matches. A negative return value indicates an error. 
   Each CftsNext() call results in the return of a single number.

       Errors Returned

    -5   (BADREAD): Error while attempting disk read.
   -16   (BADPARMS): Invalid parameters were passed to the function.
   -18   (BADHANDLE): Invalid handle was passed to the function.

       Comments

   None.

       Example

   .
   .
   .
   use sales
   xhandle = CftsOpen( 'sales.ia', 10,  .T. )
   searchstr = 'Smith, Bob'
   result = CftsSet( xhandle, srchstring)  && set up search criteria
   if result <1
       ? 'error in CftsSet()'
   endif
   result = CftsNext( xhandle )            && get the first 'hit'
   do while result != 0                    && get the rest of the hits
       result = CftsNext( xhandle )
       if CftsVeri( xhandle, trim(namefield), trim( searchstr), 1 ) = 1
           ? record verified
       endif
   enddo
   .
   .
   .

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