Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Add Row Element CSV one two dimensional array redim dimension
ArrayRedim ( array, sub1, [sub2, [sub3, [sub4, [sub5]]] ) Changes array dimensions in-place while preserving existing content when possible. "array" array to re-dimension "sub1" to "sub5" specifies the new "array" dimensions or -1 to keep existing dimensions. The default for "sub2" through "sub5" is 0 which deletes the existing dimension. Once an array dimension is set to 0, all subsequent array dimensions must be set to 0 or omitted. -1 can also be used for subsequent dimensions if current corresponding dimension is already 0. Returns @True on successful completion.See Also: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Arrays/Samples~from~Users+Array~Resize~Examples.txt
For example:
; Add one row to an existing array tmpfile = "tempfile.tmp" ArrayFilePutCSV( tmpfile, daArray, @TAB, @TRUE, 0 ) daArray = ArrayFileGetCSV( tmpfile, 1, @TAB, 1 ) FileDelete( tmpfile )
You can also add 1000 rows and 40 columns to a two dimensional array.
tmpfile = "tempfile.tmp" ArrayFilePutCSV( tmpfile, Array, @TAB, @TRUE, 0 ) Array = ArrayFileGetCSV( tmpfile, 1, @TAB, 1000, 40 ) FileDelete( tmpfile
To add 1000 entries to the one dimensional array:
tmpfile = "tempfile.tmp" ArrayFilePut( tmpfile, Array, @TRUE ) Array = ArrayFileGet( Array, "?", 1000 ) FileDelete( tmpfile )
Article ID: W17652
Filename: Add a Row to a Two Dimensional Array.txt
File Created: 2014:07:18:09:50:32
Last Updated: 2014:07:18:09:50:32