Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_writearr() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_WRITEARR()

 DESCRIPTION

 C_WRITEARR() saves a given Clipper array to a specified disk file.
 The array can be any size and can contain any data types, except
 memo and array types.

 NOTES

 The C_WRITEARR() function only works with one-dimensional arrays
 and can not convert array elements containing other arrays.  To
 convert multi-dimensional arrays, use C_WRITEARR() in a loop and
 save each dimension, one at a time, to a separate file.

 SYNTAX

 C_WRITEARR(file, array)

 PARAMETERS

 file (C) is the full name of the DOS disk file to write the array.
 The file name can contain a drive and path specifier, if needed.
 If file exists, it's contents are overwritten by the new array.

 array (A) is the Clipper array to save to disk.  The array argument
 must be passed as an array and with no quotes.

 RETURNS

 C_WRITEARR() returns the number of elements actually written to the
 disk file.

 EXAMPLES

 declare a1[5]                        && Declare and initialize array
 a1[1] = "text string"
 a1[2] = ctod("01/01/90")
 a1[3] = time()
 a1[4] = 123.78
 a1[5] = .T.
 ...
 if c_writearr("ARR1.FIL", a1) != 5   && Save array to disk file
   ? "Error writing array"
   return
 endif
 ...
 release a1                           && Release array


See Also: C_READARR() C_ATOCHAR() C_CHARTOA()

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