$FUNCNAME$
  MEMOREAD()
$CATEGORY$
  STRING,DATABASE,FILE/IO
$SUMMARY$
   Return the contents of a disk file as a character string
$LANG_RU$
         .
$SYNTAX$
     MEMOREAD(<cFile>) --> cString
$LANG_RU$
     MEMOREAD(< >) -->  
$ARGUMENTS$
     <cFile> is the name of the file to read from disk.  It must include
     an extension, if there is one, and can optionally include a path.
$LANG_RU$
     < > -     .    
     ,    .    
     .
$RETURNS$
     MEMOREAD() returns the contents of a text file as a character string.
     The maximum file size that can be read is 65,535 characters (64K)--the
     maximum size of a character string.  If <cFile> cannot be found,
     MEMOREAD() returns a null string ("").
$LANG_RU$
     MEMOREAD()      
     .   ,     - 65 535
      (64K) -     . 
       ,    < >,   
     , MEMOREAD()     ("").
$DESCRIPTION$
     MEMOREAD() is a memo function that reads a disk file into memory where
     it can be manipulated as a character string or assigned to a memo field.
     MEMOREAD() is used with MEMOEDIT() and MEMOWRIT() to edit an imported
     disk file, and then write it back to disk.  MEMOREAD() searches for
     <cFile> beginning with the current DOS directory.  If the file is not
     found, MEMOREAD() searches the DOS path.  MEMOREAD() does not use the
     xClipper DEFAULT or PATH to search for <cFile>.

     In a network environment, MEMOREAD() attempts to open the specified file
     shared and read--only.  If the file is opened exclusive by another
     process, MEMOREAD() returns a null string ("").
$LANG_RU$
     MEMOREAD() -   memo-,  
        ,      
        memo-. MEMOREAD()   
       MEMOEDIT()  MEMOWRIT()    ,
          . MEMOREAD()    ,
        < >,    ;
         ,     ,
       PATH   DOS.  
      ,   < >,  MEMOREAD()
         xClipper SET DEFAULT  SET PATH.

       MEMOREAD()     
         .     
        , MEMOREAD() 
       ("").
$EXAMPLES$

       This example uses MEMOREAD() to assign the contents of a text
	file to the Notes memo field and to a character variable:

	REPLACE Notes WITH MEMOREAD("Temp.txt")
	cString = MEMOREAD("Temp.txt")

       This example defines a function that edits a disk file:

	FUNCTION Editor( cFile )
	   LOCAL cString
	   IF (cString := MEMOREAD(cFile)) == ""
	      ? "Error reading " + cFile
	      RETURN .F.
	   ELSE
	      MEMOWRIT(cFile, MEMOEDIT(cString))
	      RETURN .T.
	   ENDIF


$LANG_RU$

         MEMOREAD()   
         memo- Note   .

       REPLACE Notes WITH MEMOREAD("Temp.txt")
       cString = MEMOREAD("Temp.txt")

          ,    .

       FUNCTION Editor( cFile)
	  LOCAL cString
	  IF (cString := MEMOREAD(cFile)) == ""
	     ? "  "+ cFile
	     RETURN .F.
	  ELSE
	     MEMOWRIT( cFile, MEMOEDIT( cString ))
	     RETURN .T.
	  ENDIF


$SEEALSO$
  MEMOEDIT(),MEMOWRIT()
$END$
