morgalis Posted April 23, 2006 Posted April 23, 2006 Is it possibile to create an array in an array? $array[1,0]= $array[1,1]= ..... and so on This can be easy to call it in an for loop. Thanx
neogia Posted April 23, 2006 Posted April 23, 2006 You can do it like this: expandcollapse popup Dim $test[2] Dim $testSub1[2] $testSub1[0] = "This" $testSub1[1] = "Works" Dim $testSub2[2] $testSub2[0] = "So does" $testSub2[1] = "This" $test[0] = $testSub1 $test[1] = $testSub2 [code=auto:0] [u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia morgalis Posted April 24, 2006 morgalis Members 13 Author Posted April 24, 2006 (edited) Please add _ArrayDisplay( $test, "Whole array" ) and look at the output. the need of this is to fill up an array with readed lines out an file. For each line an arrayadd and as sub array the array is 12 (always) so i wanna call in runtime line1 (in this case array1 ) example word 7 in subarray 7. I dont think your example seeds any info to my needs. Thanx for helping Edited April 24, 2006 by morgalis neogia Posted April 24, 2006 neogia Active Members 269 Posted April 24, 2006 (edited) _ArrayDisplay() doesn't handle nested arrays. Try this:#include <ArrayToDisplayString.au3> Dim $test[2] Dim $testSub1[2] $testSub1[0] = "This" $testSub1[1] = "Works" Dim $testSub2[2] $testSub2[0] = "So does" $testSub2[1] = "This" $test[0] = $testSub1 $test[1] = $testSub2 MsgBox(0,"Whole array", _ArrayToDisplayString($test))Edit: Here's the included file, ArrayToDisplayString Edited April 24, 2006 by neogia [u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia
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