$FUNCNAME$
  EMPTY()
$CATEGORY$
  STRING,NUMERIC,ARRAY,DATE/TIME,LOGICAL
$SUMMARY$
   Determine if the result of an expression is empty
$LANG_RU$
   ,      .
$SYNTAX$
     EMPTY(<exp>) --> lEmpty
$LANG_RU$
     EMPTY(<>) --> .  
$ARGUMENTS$
     <exp> is an expression of any data type.
$LANG_RU$
     <> -   .
$RETURNS$
     EMPTY() returns true (.T.) if the expression results in an empty value;
     otherwise, it returns false (.F.).  The criteria for determining whether
     a value is considered empty depends on the data type of <exp> according
     to the following rules:

     <PRE> List of Empty Values
     ------------------------------------------------------------------------
     Data Type    Contents
     ------------------------------------------------------------------------
     Array        Zero-length
     Character    Spaces, tabs, CR/LF, or ("")
     Numeric      0
     Date         Null (CTOD(""))
     Logical      False (.F.)
     Memo         Same as character
     NIL          NIL
     ------------------------------------------------------------------------
     </PRE>
$LANG_RU$
     EMPTY()   "" (.T.),   
       ,      ""
     (.F.).  ,     , 
         <>    
     :
     <PRE>    .
     ---------------------------------------------------------------------
             
     ---------------------------------------------------------------------
                 
                ,  , CR/LF   
                 0
                  NULL( CTOD("") )
            "" (.F.)
     MEMO              ,   
     NIL              NIL
     ---------------------------------------------------------------------
     </PRE>
$DESCRIPTION$
     The EMPTY() function has a number of uses.  You can use it to determine
     if a user entered a value into a Get object before committing changes to
     a database file.  It can also determine whether a formal parameter is
     NIL or unsupplied.  In addition, it can test an array for zero-length.
$LANG_RU$
      EMPTY()      
     .      , 
         GET-   
        .       ,
          NIL    . , ,
              .
$EXAMPLES$
       These examples illustrate use of EMPTY() against several
	different data types:

	? EMPTY(SPACE(5)), EMPTY("")        // Result: .T. .T.
	? EMPTY(0), EMPTY(CTOD(""))         // Result: .T. .T.
	? EMPTY(.F.), EMPTY(NIL)            // Result: .T. .T.

       This example uses EMPTY() to determine whether the user
	entered a value into the first Get object before writing the new
	value to the database file:

	LOCAL cCust := SPACE(15), nAmount := 0
	USE Sales NEW
	@ 10, 10 GET cCust
	@ 11, 10 GET nAmount PICTURE "999.99"
	READ
	//
	IF !EMPTY(cCust)
	   APPEND BLANK
	   REPLACE Sales->Cust WITH cCust, Sales->Amount ;
	      WITH nAmount
	ENDIF

       This example uses EMPTY() as part of the VALID clause to force
	the user to enter data into the current Get object:

	LOCAL cCode := SPACE(5)
	@ 2, 5 SAY "Enter code" GET cCode VALID !EMPTY(cCode)
	READ
$LANG_RU$
           EMPTY() 
        :

       ? EMPTY(SPACE(5)), EMPTY("")          // : .T. .T.
       ? EMPTY(0), EMPTY(CTOD(""))           // : .T. .T.
       ? EMPTY(.F.), EMPTY(NIL)              // : .T. .T.

          EMPTY()  ,  
           GET-   
            :

       LOCAL cCust := SPACE(15), nAmount := 0
       USE Sales NEW
       @ 10, 10 GET cCust
       @ 11, 10 GET nAmount PICTURE "999.99"
       READ
       //
       IF !EMPTY(cCust)
	  APPEND BLANK
	  REPLACE Sales->Cust WITH cCust, Sales->nAmount WITH nAmount
       ENDIF

          EMPTY()    VALID
              GET- 
       :

       LOCAL cCode := SPACE(5)
       @ 2, 5 SAY " " GET cCode VALID !EMPTY(cCode)
       READ
$SEEALSO$
  LEN()
$END$
