[BUG]Associative Arrays
Posted: 02 Jan 2018, 13:47
AutoHotkey_2.0-a081-cad307c
Delete method delete all but last one.
The Code represent how Delete method detele all but last item in the list (Associative Array).
Check when cntr:= 10 and cntr:= 100 the result List contain 1 item when all items Delete(byKey).
Code: Select all
cntr:= 2
List:=[]
loop cntr {
key:= val:= A_Index
List[key]:= val
;List[A_Index]:= A_Index ;the same as above
}
msgBox("after Set")
for key, val in List {
msgBox(key " := " val)
}
for key, val in List {
List.Delete(key)
}
msgBox("after Del")
for key, val in List {
msgBox(key " := " val)
}
The Code represent how Delete method detele all but last item in the list (Associative Array).
Check when cntr:= 10 and cntr:= 100 the result List contain 1 item when all items Delete(byKey).