Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - __soft_seek non-matching seek setting http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 __soft_seek         Non-matching seek setting
------------------------------------------------------------------------------
 Declaration
   database.hdr

 Syntax
   logical __soft_seek

 Default
   .f. (seek failure positions the record pointer at EOF).

 Description
   The __soft_seek system variable controls the behavior of the application
   for unsuccessful database seeks. If __soft_seek is set to .t., when
   seeking a non-matching value, the record pointer will not be positioned
   at EOF, but to the next record in the index order.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc SeekSoft static
   param alias sDbf, const char cSeek, value logical lSoftSeek
   __soft_seek := lSoftSeek
   !sDbf seek cSeek
   ? found(), recno()
   endproc
   
   proc Test_soft_seek
   vardef
      char cName
   enddef
   input "Name: " to cName
   open sTest index sIdxLN
   set exact on
   SeekSoft( sTest, cName, .f. )
   SeekSoft( sTest, cName, .t. )
   endproc

   proc main
   Test_soft_seek()
   endproc

See Also: seek

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