#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 Changed 6 years ago by Jpm
comment:2 Changed 6 years ago by Melba23
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 Changed 6 years ago by Melba23
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 Changed 6 years ago by Melba23
- Owner set to Melba23
- Status changed from new to assigned
comment:5 Changed 6 years ago by Melba23
- Milestone set to 3.3.15.1
- Resolution set to Fixed
- Status changed from assigned to closed
Fixed by revision [12256] in version: 3.3.15.1
comment:6 Changed 6 years ago by Melba23
Fixed by revision [12257] in version: 3.3.15.1
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.


tested with release or Beta?