Function MemoWrit() Foundation
Writes a character string or a memo field into a file.
MemoWrit( <cFilename>, <cString> ) --> lSuccess
If MemoWrit() could successfully write the text <cString> into the file, the function returns the value .T. (true). Otherwise, the return value is .F. (false).
The memo function MemoWrit() writes a character string into a file. It is the counterpart of MemoRead() which reads files. When the path is not specified in <cFilename>, MemoWrit() writes the file into the current directory. MemoWrite() ignores the setting of SET DEFAULT to determine the path. If the file <cFilename> already exists, it is overwritten without warning.
// In this example, the functions MemoRead(), MemoWrit(),
// and MemoEdit() are used to program a short user-defined
// function for a simple text file editor.
PROCEDURE Main
? TextEditor( "Test.txt" )
RETURN
FUNCTION TextEditor( cFilename )
RETURN MemoWrit( cFilename, MemoEdit( MemoRead( cFilename ) ) )
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.