﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1186	"native support of array ""slices"" as Lvalue and Rvalue"	anonymous	Nutster	"Please enhance the current array datatype by array slices (i.e. ""subarray"" or ""part of array"") ''natively''.

I know, this feature can be implemented by UDFs, too. Nevertheless I ask it as feature request due
 * UDFs need individual code for '''each''' supported dimension. They would become quite fat for supporting all possible 64 dimensions of arrays. (So today's UDFs will support 1D, fewer do 2D, and that's it).
 * native support is faster
 * syntax is common in other languages, therefore ""expected"" by the normal programmer (until he becomes an AutoIt maniac) 

Example:
After DIMensioning an array ''$a[u][v]'' you can use the syntax ''$a'' for whole array (already available), ''$a[x][y]'' to address the content in cell ''x,y'' (already available), and ('''new''') ''$a[x]'' for the sub-array ''$a[x][*]'' (1D array with subscript: [v])
{{{
; == 3D Array -> 2D- or 1D ""slices"" as RValue ==
Dim $a[4][3][2] = [[[""000"",""001""], [""010"",""011""], [""020"",""021""]], _
                   [[""100"",""101""], [""110"",""011""], [""120"",""121""]], _
                   [[""200"",""201""], [""210"",""211""], [""220"",""221""]], _
                   [[""300"",""301""], [""310"",""311""], [""320"",""321""]]]
Local $b
$b = $a ; already AVAILABLE: copy whole array
$b = $a[1] ; requested: extract array slice of $a and assign it to $b
           ; here: copy $a[1][*][*] as 2D array, this equates the statement
           ; Local $b[3][2] = [[""100"",""101""],[""110"",""011""],[""120"",""121""]]
$b = $a[1][2] ; requested: extract array slice of $a and assign it to $b
           ; here: copy $a[1][2][*] as 1D array, this equates the statement
           ; Local  $b[2] = [""120"",""121""]
$b = $a[1][2][0] ; already AVAILABLE: copy content, here: $b = ""120""


; == 3D Array -> 2D- or 1D ""slices"" as LValue ==
Dim $c[3][2] = [[""aaa"",""AAA""], [""bbb"",""BBB""], [""ccc"",""CCC""]]
$a[1] = $c  ; replace addressed values of $a[1][x][y] by values of $c[x][y]
            ; NOTE: identical dimension (2D) and subscript ([3][2]) on both sides!
            ; NOTE: $a[0][][], $a[2][][] and $a[3][][] stay unmodified
$a[3][2] = [""xxx"", ""XXX""]
            ; replace addressed values of $a[3][2][*] by given values
            ; NOTE: identical dimension (1D) and subscript ([2]) on both sides!
$a[2][2][1] = ""###"" ; already AVAILABLE: change content of array element 

; now array $a has become:
;  [[[""000"",""001""], [""010"",""011""],[""020"",""021""]], _
;   [[""aaa"",""AAA""], [""bbb"",""BBB""], [""ccc"",""CCC""]], _  ; <= $a[1] = $c
;   [[""200"",""201""], [""210"",""211""], [""220"",""###""]], _  ; <= $a[2][2][1] = ""###""
;   [[""300"",""301""], [""310"",""311""], [""xxx"",""XXX""]]]    ; <= $a[3][2] = [""xxx"", ""XXX""]
}}}
 "	Feature Request	closed		AutoIt		None	Rejected	array	
