victor Posted March 15, 2012 Share Posted March 15, 2012 (edited) is it possible to redim 2d array ? ReDim $Array[1][2] $Array[ubound($Array)-1] = [ 1 , "Test"] ReDim $Array[1][2] $Array[ubound($Array)-1] = [ 2 , "Test2"] _ArrayDisplay($Array) I wanted to add new item into 2d array Edited March 15, 2012 by victor Link to comment Share on other sites More sharing options...
czardas Posted March 15, 2012 Share Posted March 15, 2012 (edited) You mean something like this? #include <Array.au3> Dim $array[2][2] = [[1,3],[2,4]] _ArrayDisplay($array) ReDim $array[2][3] $array[0][2] = 5 $array[1][2] = 6 _ArrayDisplay($array) Edited March 15, 2012 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
UEZ Posted March 15, 2012 Share Posted March 15, 2012 (edited) Here my version: #include <Array.au3> Global $aTest[1][2] = [[1, "Test"]] _ArrayDisplay($aTest) ReDim $aTest[UBound($aTest) + 1][2] $aTest[UBound($aTest) - 1][0] = 2 $aTest[UBound($aTest) - 1][1] = "Test" _ArrayDisplay($aTest) Br, UEZ Edited March 15, 2012 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
victor Posted March 15, 2012 Author Share Posted March 15, 2012 many thanks, Link to comment Share on other sites More sharing options...
LoneWolf_2106 Posted July 3, 2017 Share Posted July 3, 2017 Hi guys, i have the same issue and i didn't understand how to redim my 2D Array. First i try to redim the row and then the column. Func FileSearch($sStringToSearch) $k=0 For $i = 0 To UBound($content_array) - 1 $search_result=StringInStr($content_array[$i],$sStringToSearch) If $search_result<>0 Then ReDim $SearchOnlineActivation[$i + 1][$k] For $k=0 To 25 ReDim $SearchOnlineActivation[$i][$k +1] $SearchOnlineActivation [$i][$k] = $content_array[$i] $k+=1 _ArrayDisplay($SearchOnlineActivation) Next EndIf Next EndFunc Can anyone help me? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now