Weekly Shaarli

All links of one week in a single page.

Week 05 (January 27, 2025)

How do you declare a 2d array? - Page 2 - AutoIt General Help and Support - AutoIt Forums

Both Arrays and Maps use similar syntax, so care is required to ensure the variable is of the correct datatype - this is determined by the first declaration line for the variable:

Using empty [ ] declares a Map:


Local $vVar[] ; A Map

Filling the [ ] with a dimension size declares an Array:


Local $vVar[3] ; An Array

Assigning element values when declaring makes the variable an Array - these three lines are functionally equivalent:


Local $vVar[3] = [1, 2, 3] ; An Array
Local $vVar[] = [1, 2, 3] ; An Array
Local $vVar = [1, 2, 3] ; An Array