$FUNCNAME$
  NETERR()
$CATEGORY$
  SYSTEM,ENVIRONMENT,FILE/IO,DATABASE,INFO
$SUMMARY$
   Determine if a network command has failed
$LANG_RU$
          .
$SYNTAX$
     NETERR([<lNewError>]) --> lError
$LANG_RU$
     NETERR([<  >]) -->  
$ARGUMENTS$
     <lNewError>, if specified, sets the value returned by NETERR() to
     the specified status.  <lNewError> can be either true (.T.) or false
     (.F.).  Setting NETERR() to a specified value allows the runtime error
     handler to control the way certain file errors are handled.  For more
     information, refer to Errorsys.prg.
$LANG_RU$
     <  > -  ,  ,
      NETERR(),  . <  > 
       "" (.T.),  "" (.F.).  ,
       NETERR(),   
        .     
      Errorsys.prg.
$RETURNS$
     NETERR() returns true (.T.) if a USE or APPEND BLANK fails.  The initial
     value of NETERR() is false (.F.).  If the current process is not running
     under a network operating system, NETERR() always returns false (.F.).
$LANG_RU$
     ,  NETERR(),   DefError()
      Errorsys.prg,   
       .    (  
     ERRORBLOCK())   ,  NETERR() 
     "" (.T.)     APPEND BLANK  USE.
       NETERR() - "" (.F.).   
          ,
     NETERR()   "" (.F.).
$DESCRIPTION$
     NETERR() is a network function.  It is a global flag set by USE,
     USE...EXCLUSIVE, and APPEND BLANK in a network environment.  It is used
     to test whether any of these commands have failed by returning true
     (.T.) in the following situations:

     <PRE> NETERR() Causes
     ------------------------------------------------------------------------
     Command             Cause
     ------------------------------------------------------------------------
     USE                 USE EXCLUSIVE by another process
     USE...EXCLUSIVE     USE EXCLUSIVE or USE by another process
     APPEND BLANK        FLOCK() or RLOCK() of LASTREC() + 1 by another user
     ------------------------------------------------------------------------
     </PRE>

     NETERR() is generally applied in a program by testing it following a USE
     or APPEND BLANK command.  If it returns false (.F.), you can perform the
     next operation.  If the command is USE, you can open index files.  If it
     is APPEND BLANK, you can assign values to the new record with a REPLACE
     or @...GET command.  Otherwise, you must handle the error by either
     retrying the USE or APPEND BLANK, or terminating the current operation
     with a BREAK or RETURN.
$LANG_RU$
     NETERR() -   .    
          USE, USE EXCLUSIVE
      APPEND BLANK  .      
       NETERR() (  DefError()) 
     "" (.T.):

     <PRE>  NETERR() - "" (.T.).
     ---------------------------------------------------------------------
               
     ---------------------------------------------------------------------
     USE               USE EXCLUSIVE   
     USE EXCLUSIVE     USE  USE EXCLUSIVE   
     APPEND BLANK     FLOCK()    RLOCK() 
		       LASTREC()+1
     ---------------------------------------------------------------------
     </PRE>

        NETERR()  - "" (.F.),  
       .  ,   
     USE    ,    
     APPEND BLANK      REPLACE 
     @...GET.   ,     
       USE  APPEND BLANK,   
      BREAK  RETURN.
$EXAMPLES$
       This example demonstrates typical usage of NETERR().  If the
	USE succeeds, the index files are opened and processing continues.
	If the USE fails, a message displays and control returns to the
	nearest BEGIN SEQUENCE construct:

	USE Customer SHARED NEW
	IF !NETERR()
	   SET INDEX TO CustNum, CustOrders, CustZip
	ELSE
	   ? "File is in use by another"
	   BREAK
	ENDIF
$LANG_RU$
            
       NETERR().    USE  ,  
        ,   .   USE 
        ,       :

       USE Customer SHARED NEW
       IF !NETERR()
       SET INDEX TO CustNum, CustOrders, CustZip
       ELSE
       ? "    "
       ENDIF
$SEEALSO$
  RLOCK(),FLOCK()
$END$
