﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3166	Error in Arrays wiki	lorenzo.santina.dev@…		"At wiki page:
https://www.autoitscript.com/wiki/Arrays#Arrays_in_Arrays

in the seciton Arrays in Arrays there is this sentence:

""The thing is, there is no way to directly access that array stored in the element. You have to go through a variable to get access to the embedded array which may make your code overly complicated and difficult to debug.""

This is NOT true.

In fact you CAN directly access the array stored in an element of another array, without go through a variable, doing so:
{{{
($arr[0])[0] ;first element of the array stored in the first element of $arr
}}}

I rewrote the script example in that page:

{{{
Local $arr[3]

Local $a1[3] = [2, ""a1-1"",""a1-2""]
Local $a2[3] = [2, ""a2-1"",""a2-2""]

$arr[0] = 2
$arr[1] = $a1
$arr[2] = $a2

For $i = 1 to $arr[0]
    If IsArray($arr[$i]) Then
        For $j = 1 to ($arr[$i])[0]
            ConsoleWrite(""($arr["" & $i & ""])["" & $j & ""] := "" & ($arr[$i])[$j] & @LF)
        Next
    Else
        ConsoleWrite(""!>Oops!, What happened? Expected an array!"" & @LF)
    EndIf
Next
}}}

Please update the wiki"	Bug	closed		Documentation	3.3.14.2	None	Fixed		
