Opened 15 years ago
Closed 15 years ago
#1520 closed Bug (No Bug)
_ArrayAdd doesn't work after _ArrayDelete has removed the last element
Reported by: | snarks@… | Owned by: | Gary |
---|---|---|---|
Milestone: | Component: | Standard UDFs | |
Version: | 3.3.4.0 | Severity: | None |
Keywords: | Cc: |
Description
_ArrayDelete returns an empty string after the last element of an array has been removed. _ArrayAdd will not then work, as the variable is no longer an array.
_ArrayAdd could be simply amended to test for an empty string and assign a one-element array to the variable, possinly using the internal _ArrayCreate function.
Alternatively, if the existing behaviour of not being able to replace an empty string with an array needs to be conserved, _ArrayDelete could be amended to return a special value that could then be detected by _ArrayAdd. I don't know enough about the AutoIt internals to know if such a special value could be crafted that would not clash with existing functionality or cause additional problems to such functions as UBound() which should retain its existing behaviour of returning 0 for an "empty array" special value.
Attachments (1)
Change History (2)
Changed 15 years ago by snarks@…
comment:1 Changed 15 years ago by Valik
- Resolution set to No Bug
- Status changed from new to closed
There are numerous things wrong with the suggestion and I don't really view the problem as a bug.
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Test case showing that an array which has its last element removed cannot have a new element added