Opened on Apr 12, 2020 at 3:42:54 PM
Closed on Apr 13, 2020 at 5:35:28 PM
Last modified on Apr 13, 2020 at 5:37:22 PM
#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:2 by , on Apr 13, 2020 at 8:42:47 AM
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 , on Apr 13, 2020 at 10:03:34 AM
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 , on Apr 13, 2020 at 10:03:46 AM
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:5 by , on Apr 13, 2020 at 5:35:28 PM
| 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?