#3755 closed Bug (Fixed)
_ArrayInsert fails with Error 3 when the Insert Positions parameter is a delimited string
| Reported by: | AlanParry | Owned by: | Melba23 |
|---|---|---|---|
| Milestone: | 3.3.15.1 | Component: | Standard UDFs |
| Version: | 3.3.14.5 | Severity: | None |
| Keywords: | Cc: |
Description
For example, if the Insert Positions parameter $vValue is "7;10" _ArrayInsert fails with Error code 3.
The reason is that when _ArrayInsert compares the insertion points to check that they are in ascending order, what it compares are the string representation of the numbers and guess what: "7" is NOT less than "10"
Attachments (0)
Change History (6)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
The old chestnut of numbers being converted to strings and then compared, leading to invalid comparisons. Easy to fix - and I will check the other _Array functions to see if there are similar errors hiding away.
M23
comment:3 by , 6 years ago
Fixed _Insert and also amended _Delete, although the latter does not depend on ascending indices. If you would like to try the amended library before I commit it please PM me and I will let you have a copy.
M23
comment:4 by , 6 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:5 by , 6 years ago
| Milestone: | → 3.3.15.1 |
|---|---|
| Resolution: | → Fixed |
| Status: | assigned → closed |
Fixed by revision [12256] in version: 3.3.15.1

tested with release or Beta?