Object numeric strings keys still treated as integer

Discuss the future of the AutoHotkey language
Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
GitHub: cocobelgica

Object numeric strings keys still treated as integer

16 Jun 2014, 10:11

As per topic title, see code below:

Code: Select all

obj := []
obj["123"] := "AutoHotkey"
for k in obj
	MsgBox % Type(k)
MsgBox % obj.HasKey(123)
return
v2-changes wrote:v2-changes: Numeric strings are now treated as strings, not integers. For instance, x[1] is not equivalent to x[n] where n contains "01" or "1", and the string keys "01" and "1" are no longer equivalent.
Also, obj["`t 123`t"] is considered the same as obj[123]
lexikos
Posts: 6668
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Object numeric strings keys still treated as integer

20 Jun 2014, 21:45

Looks like I got a bit ahead of myself. Fixed in v2.0-a48.
Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
GitHub: cocobelgica

Re: Object numeric strings keys still treated as integer

21 Jun 2014, 09:34

Thanks lexikos :-)

Return to “AutoHotkey v2 Development”

Who is online

Users browsing this forum: No registered users and 5 guests