home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 19.6 Psearch()
- Author: Joe Booth
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- function Psearch(cKey, nRange, nField)
- LOCAL arr_ := {}
- local oldsoft := set(_SET_SOFTSEEK, .T.)
- seek cKey
- skip -nRange
- while len(arr_) < (nRange*2) .and. !eof()
- Aadd(arr_,Fieldget(nfield))
- skip +1
- enddo
- set(_SET_SOFTSEEK, oldsoft) // restore previous SOFTSEEK setting
- return arr_
-
- // end of file CHP1906.PRG
-