Join and Filter give a value for a Long array, and raise 9 for a 2-D one, where VB6 raises 5 or 13
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start by locating the implementations of Join and Filter and the allocation check implemented for #840. Check how the array’s element type and dimension are represented, then run or add focused tests for allocated Long and two-dimensional arrays. Done means those cases raise error 5 for Join and error 13 for Filter, while unallocated arrays retain the #840 behavior.
Written by the indexing model from the issue text.
Description
What happens
Join and Filter accept any one-dimensional array and read every element as text. VB6 accepts only a String or Variant array, and only one dimension:
| Call | HexIDE | VB6 (measured, native and in the IDE) |
|---|---|---|
Join(al, "-"), Dim al(1) As Long holding 1 and 12 |
"1-12" |
error 5 |
Filter(al, "1") |
["1", "12"] |
error 13 |
Join(m, "-"), Dim m(1, 1) As String |
a trappable 9 | error 5 |
Filter(m, "a") |
a trappable 9 | error 13 |
Join(Array(1, 12), "-"), a Variant array of numbers |
"1-12", no error |
Silently wrong for the Long array: a program that would stop in VB6 gets a joined string instead. For the 2-D array, HexIDE raises a trappable 9, Subscript out of range, where VB6 raises 5 or 13: a wrong error number, not a value. Checked by running both at #840's head.
Note
An unallocated or erased array of any type, Long included, is not an error: Join gives "" and Filter an unallocated String array. That's measured and implemented in #840. So VB6 checks the allocation before the element type.
Fix
After the allocation check:
Joinraises 5 for an array that isn't String or Variant, or isn't one-dimensional;Filterraises 13 for the same.
A Null delimiter was on this list, and #840 now handles it: it's measured there as read only when the array has an element.
Found in #840's review.
- Dominant language
- C#
- Stars
- 11
- Forks
- 6
- Avg merge
- 2h 5m
- Merged PRs (30d)
- 192
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hexide-io/HexIDE
-
ai-chat bug trivial
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug small tooling
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug tooling trivial
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug misleading tooling trivial
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug trivial ui
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
All issues in hexide-io/HexIDE
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sebastienros/jint#4282 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
pyrevitlabs/pyRevit#3792 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
Maintainers usually reply within 1 day
-
area: design documentation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
eyalgolan/statecraft-israel#883 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 3 days