[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
MEMOWRIT()
Write a character string or memo field to a disk file
------------------------------------------------------------------------------
Syntax
MEMOWRIT(<cFile>, <cString>) --> lSuccess
Arguments
<cFile> is the name of the target disk file including the file
extension and optional path and drive designator.
<cString> is the character string or memo field to write to <cFile>.
Returns
MEMOWRIT() returns true (.T.) if the writing operation is successful;
otherwise, it returns false (.F.).
Description
MEMOWRIT() is a memo function that writes a character string or memo
field to a disk file. If a path is not specified, MEMOWRIT() writes
<cFile> to the current DOS directory and not the current DEFAULT
directory. If <cFile> already exists, it is overwritten.
MEMOWRIT() is generally used with MEMOREAD() to load text files into
memory where they can be edited, displayed, and written back to disk.
You can also use MEMOWRIT() as a quick way of exporting a memo field to
a text file.
Examples
. This example uses MEMOWRIT() with MEMOREAD() to allow editing
of memo fields with an external editor:
LOCAL cEditor := "MYEDIT.EXE"
USE Sales NEW
IF MEMOWRIT("Cliptmp.txt", Notes)
RUN (cEditor + " Cliptmp.txt")
REPLACE Notes WITH MEMOREAD("Cliptmp.txt")
ELSE
? "Error while writing Cliptmp.txt"
BREAK
ENDIF
Files Library is EXTEND.LIB.
See Also:
MEMOEDIT()
MEMOREAD()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson