Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
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
In general, WIL arrays are fixed in size at the point of the original ArrDimension function, and there is no provision for resizing the array afterwards.
Advice on this situation included over-allocating the original array to be able to handle any future adds.
Or allocating a new array of the desired size and a time-intensive copying of the data, array element by array element.
This situation has not changed, but simple, two line methods have been recognized that can easily and fairly quickly enlarge one and two dimensiopnal arrays.
ArrayFilePut("tempfile.tmp",MyArray,@TRUE) MyArray=ArrayFileGet("tempfile.tnp","?",1000)
ArrayFilePutCSV("tempfile.tmp",OtherArray,@TAB,@TRUE,0) OtherArray=ArrayFileGetCSV("tempfile.tmp",1,@TAB,1000,40)
Article ID: W16905
File Created: 2014:07:18:09:50:34
Last Updated: 2014:07:18:09:50:34