How to define a 2D array Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
ankitkraken
Posts: 84
Joined: 01 Jun 2019, 08:47
Location: India

How to define a 2D array  Topic is solved

21 Oct 2019, 10:05

Hi,

I was trying to work with 2D arrays in AHK, as I wasn't able to find a simple newb-friendly post, here it is.

Code: Select all

my_2D := [[1],[2],[3],[4],[5],[6]]
my_2D[1][1] := "a"
First define your matrix with the number of rows that you want, columns are not required as 2D is basically array of arrays.
Here I am using 6 rows, like this you can populate a 2D matrix.
Let me know if a similar post exists, I shall delete this in that case.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Araphen, doanmvu, Google [Bot], mamo691 and 368 guests