Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - pickwrite() write a list to a file http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 pickwrite()         Write a list to a file
------------------------------------------------------------------------------
 Declaration
   pick.hdr

 Syntax
   func logical pickwrite extern
   param value _SLIST  pList, ;
         const char    cFile, ;
         value logical lAppend

 Arguments
   pList is the list to write to file.

   cFile is the name of the target file.

   lAppend indicates if the text is to be appended to the file.

 Return
   A logical indicating the success of operation.

 Description
   The pickwrite() function writes a list to a text file. For the
   function to succeed it is necessary that the list only contains normal
   text.

   If the lAppend parameter is .t. then the list contents is appended to
   the end of the file. If the target file does not exist, or the lAppend
   parameter is .f., then the file is created.

 Example
   #define EXAMPLE_LIST
   #include example.hdr

   proc Test_pickwrite
   vardef
      _SLIST pList
   enddef
   pList := ExampleList()               // create a list of strings
   pickwrite( pList, "test.txt", .f. )  // write list to file
   pickclear( pList )                   // eliminate the list
   type "test.txt"                      // display file contents
   wait
   erase "test.txt"                     // clean up
   endproc

   proc main
   Test_pickwrite()
   endproc

See Also: pickfile()

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