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>searching for embedded text and text fragments</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   Searching for Embedded Text and Text Fragments

   CFTS has no difficulty finding instances of embedded text.
   In pure Clipper, you might use a technique like this:

   do while ! eof()
       if <search text> $ field1
           ? 'got one'
       endif
       skip
   enddo

   While this method will work, it forces you, just as LOCATE does, to 
   search sequentially through your file(s) to find instances of the 
   search text. Clipper's native indexes are of no use in situations like 
   this, since all matches using SEEK require that valid finds match from 
   the beginning of the indexed string. With a CFTS index in place, you 
   already have the ability to search for embedded strings. CFTS's 
   indexing mechanism will return all valid hits for a given search 
   string, regardless of where that string falls within the index's 
   records.


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