What he means is thatpneumatic wrote:just me wrote:There's no section in the documentation telling you that Array.GetCapacity() will always return the same value as Array.Length() for simple arrays, so it does not contradict 'documented behaviour'.
The issue is with StrSplit not GetCapacity
StrSplitreturns an array and because in general an array can have different length and capacity there is no issue.
Capacity is not the same as the number of elements so it is in fact correct.pneumatic wrote:documentation wrote:StrSplit()
For example: "," would divide the string based on every occurrence of a comma. Similarly, [A_Tab, A_Space] would create a new array element every time a space or tab is encountered in the input string.
The part in bold isn't strictly correct because it creates more array elements than just "every time a space or tab is encountered".
Actually it is documented if you look at GetCapacity you won't see much but few lines above it in SetCapacity you can see the following:pneumatic wrote:Predicted response: nothing wrong because GetCapacity doesn't return the number of "elements" but some other [undocumented] thing
So in your sentence the number of "elements" is the current number of key-value pairs and the "[undocumented] thing" is the maximum number of elements.The maximum number of key-value pairs the object should be able to contain before it must be automatically expanded.
Also in general 'just me' thinks that if your bug report contains "For some reason..." and/or "I'm guessing..." you shouldn't post it in the bug report forum but in Ask For Help and only after confirmation that it is in fact a bug it should be posted here.
I hope that I described your position correctly if I misunderstood or misrepresented something please correct me, that was not my intention. All I wanted is to save pneumatic some frustration.