Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Join and Filter give a value for a Long array, and raise 9 for a 2-D one, where VB6 raises 5 or 13

Open
#875 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
backend

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

bug interpreter silently-wrong small

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:

  • Join raises 5 for an array that isn't String or Variant, or isn't one-dimensional;
  • Filter raises 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hexide-io/HexIDE

All issues in hexide-io/HexIDE

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.