Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - filewrite(<c filespec>, <c text>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FILEWRITE(<C filespec>, <C text>)
 Writes a text file to disk.
 Returns <expC> "DONE" if written successfully, otherwise error message.

 Useful in transferring data between disk files and memo fields.

 Does not search DOS or Clipper PATH for files.

 * Write from memo field into disk file
 USE File   && close when no longer needed
 <find appropriate record>
 written = FILEWRITE("Textfile.txt", Memo_field)
 IF written = "DONE"
    ? "File was successfully written"
 ELSE
    ? written   && error message
 ENDIF

 * Write from memory variable into disk file
 written = FILEWRITE("Textfile.txt", memvar)
 IF written = "DONE"
    ? "File was successfully written"
 ELSE
    ? written   && error message
 ENDIF

 Hazard
    Overwrites an existing file having the specified <filespec>
    without warning; all data in the existing file will be destroyed.


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: FILEREAD() FILESIZE() ISDRIVE() WPSTRIP()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson