Assign by &reference an array key? Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
RomAnT
Posts: 21
Joined: 23 Sep 2021, 13:19

Assign by &reference an array key?

Post by RomAnT » 26 Sep 2021, 13:08

Is it possible to assign array key by reference?

Code: Select all

myArr := []
myArr.Push("one")

a := &myArr[1]   ; <--- Error:  "&" requires a variable.

%a% := "two"	

msgbox myArr[1]

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Assign by &reference an array key?  Topic is solved

Post by swagfag » 26 Sep 2021, 18:04

no
(maybe if u play with the internals)

Post Reply

Return to “Ask for Help (v2)”