Search the Community
Showing results for tags '$vrange'.
Found 1 result
Hi Gents, Updating one of my older scripts here and cant get around this wall... I want to extract chunks from an larger array of indefinite size as smaller arrays in a loop and work with them individually and then move on to the the next "extracted array" until the original array is empty. The amount of elements in each extracted array will usually be different so I am using _ArraySearch to find my start and stop points and storing them as variables, which brings me to my problem. I want to "remove" (delete) the extracted array from the original array each time using _ArrayDelete but it doesnt seem to want me to use variables. Here is a reproducer: #include <Array.au3> Local $aArray For $i = 0 To 9 $aArray[$i] = $i Next _ArrayDisplay($aArray, "Original") $i_Start = 0 $i_End = 5 Local $aExtract = _ArrayExtract($aArray, $i_Start, $i_End) _ArrayDisplay($aExtract, "Extracted Array") Local $vRange = $i_Start - $i_End _ArrayDelete($aArray, $vRange) ;==error 3 - $vRange is not a valid range string If @error Then MsgBox(0, "error =", @error) EndIf _ArrayDisplay($aArray, "After Deletion")Any suggestions would be appreciated :-) cya, Bill edit: the error I am getting is 3 - $vRange is not a valid range string edit 2: BTW this doesn't work either _ArrayDelete($aArray, $i_Start - $i_End)