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 - found() return result of last seek operation http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 found()             Return result of last seek operation
------------------------------------------------------------------------------
 Declaration
   database.hdr

 Syntax
   func logical found extern

 Arguments
   None.

 Return
   A logical indicating if the last database search found a matching record.

 Description
   The found() function returns .t. if the most recent search from the
   continue, find, locate or seek commands was successful.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_found
   open sTest index sIdxLN
   seek "Vanderbilt"
   if found()
      ? "Query found at record", istr( recno() )
   endif
   close index
   go top
   // for unindexed databases, use the locate command
   locate all for "y" $ sTest->lastname
   do while found()
      ? recno(), sTest->lastname
      continue
   enddo
   endproc

   proc main
   Test_found()
   endproc

See Also: continue find locate seek

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