This is my first post in this forum. Thank you all in advance.
For the last few hours I am trying to understand the issue with my script. I am trying to copy an Array into a new array.
The issue is with the "number of Elements in the second array" . Array.GetCapacity() returns undesired values.
I couldn't understand the bug in my script. or I am seriously missing something.. Please help..
Script as follows:
Code: Select all
FirstArray := ["One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten"]
MsgBox, % FirstArray.GetCapacity() ;[b] Returns 10.. Perfect[/b]
SecondArray := Object()
Loop, 10
{
SecondArray[A_index] := FirstArray[A_index]
;MsgBox, % SecondArray[A_index] [b];Returns All Elements.. Perfec[/b]t
}
MsgBox, % SecondArray.GetCapacity() ;[b]Problem Here.. Returns 16[/b]
I appreciate your help.. Thank you