bug? obj.GetCapacity() != result in ahk v1

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
User avatar
hyaray
Posts: 85
Joined: 20 Jun 2015, 01:37
Contact:

bug? obj.GetCapacity() != result in ahk v1

25 May 2019, 02:01

Code: Select all

o := {"a":"aa","b":"bb",2:"c","c":"d","e":"f"}
MsgBox(o.GetCapacity() . " " . o.Length() . " " . o.Count()) ;5 2 5
in ahk v1, return 8 2 5 :headwall: :headwall:

by the way, is there a build-in method to know a var([1,2] or {"a":"aa",2:"bb"}) is object or a array??
thanks a lot!!! :xmas:
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: bug? obj.GetCapacity() != result in ahk v1

25 May 2019, 04:12

5 is sufficient for your example, if you relied on it being 8 in v1, that would be a bug in your code.

You may want to have a look at this topic :arrow: Objects - preview of upcoming changes.

Cheers.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: Google [Bot], just me and 29 guests