$FUNCNAME$
  FOUND()
$CATEGORY$
  DATABASE
$SUMMARY$
   Determine if the previous search operation succeeded
$LANG_RU$
   ,     .
$SYNTAX$
     FOUND() --> lSuccess
$LANG_RU$
     FOUND() -->    
$RETURNS$
     FOUND() returns true (.T.) if the last search command was successful;
     otherwise, it returns false (.F.).
$LANG_RU$
     FOUND()   "" (..),   
       ,    - "" (.F.).
$DESCRIPTION$
     FOUND() is a database function that determines whether a search
     operation (i.e., FIND, LOCATE, CONTINUE, SEEK, or SET RELATION)
     succeeded.  When any of these commands are executed, FOUND() is set to
     true (.T.) if there is a match; otherwise, it is set to false (.F.).

     If the search command is LOCATE or CONTINUE, a match is the next record
     meeting the scope and condition.  If the search command is FIND, SEEK or
     SET RELATION, a match is the first key in the controlling index that
     equals the search argument.  If the key value equals the search
     argument, FOUND() is true (.T.); otherwise, it is false (.F.).

     The value of FOUND() is retained until another record movement command
     is executed.  Unless the command is another search command, FOUND() is
     automatically set to false (.F.).

     Each work area has a FOUND() value.  This means that if one work area
     has a RELATION set to a child work area, querying FOUND() in the child
     returns true (.T.) if there is a match.

     By default, FOUND() operates on the currently selected work area.  It
     can be made to operate on an unselected work area by specifying it
     within an aliased expression (see example below).

     FOUND() will return false (.F.) if there is no database open in the
     current work area.
$LANG_RU$
     FOUND()     , 
     ,     ( 
     FIND, LOCATE, CONTINUE, SEEK, SET RELATION) .
       -   , FOUND() 
      ""(..),    ;  
         ""(.F.).

         LOCATE  CONTINUE,  
      ,     , 
          .    
     FIND, SEEK  SET RELATION,    , 
           ,  
       .   SET SOFTSEEK 
      ON,     ,  
      ,      .
          , FOUND() 
      ""(..);   ,   
     ""(.F.).

       FOUND()    ,   
          .    
       ,  FOUND()  
      ""(.F.).

             FOUND().
      ,   -    
            SET RELATION, 
     FOUND()       ""(..)
       ,    .

        FOUND()    .
             
      (.  ).
$EXAMPLES$
       This example illustrates the behavior of FOUND() after a
	record movement command:

	USE Sales INDEX Sales
	? INDEXKEY(0)              // Result: SALESMAN
	SEEK "1000"
	? FOUND()                  // Result: .F.
	SEEK "100"
	? FOUND()                  // Result: .T.
	SKIP
	? FOUND()                  // Result: .F.

       This example tests a FOUND() value in an unselected work area
	using an aliased expression:

	USE Sales INDEX Sales NEW
	USE Customer INDEX Customer NEW
	SET RELATION TO CustNum INTO Sales
	//
	SEEK "Smith"
	? FOUND(), Sales->(FOUND())

       This code fragment processes all Customer records with the key
	value "Smith" using FOUND() to determine when the key value changes:

	USE Customer INDEX Customer NEW
	SEEK "Smith"
	DO WHILE FOUND()
	   .

	   . <statements>
	   .
	   SKIP
	   LOCATE REST WHILE Name == "Smith"
	ENDDO
$LANG_RU$
           FOUND()  
         :

       USE Sales INDEX Sales
       ? INDEXKEY(0)                // : SALESMAN
       SEEK "1000"
       ? FOUND()                    // : .F.
       SEEK "100"
       ? FOUND()                    // : .T.
       SKIP
       ? FOUND()                    // : .F.

           FOUND()   
            ,  :

       USE Sales INDEX Sales NEW
       USE Customer INDEX Customer NEW
       SET RELATION TO CustNum INTO Sales
       //
       SEEK "Smith"
       ? FOUND(), Sales->(FOUND())

        ,      
       Customer    "Smith",  FOUND(), 
       ,    :

       USE Customer INDEX Customer NEW
       SEEK "Smith"
       DO WHILE FOUND()
	  .
	  . <>
	  .
	  SKIP
	  LOCATE REST WHILE Name = "Smith"
       ENDDO
$SEEALSO$
  EOF()
$END$
