I have a search function that returns an array. The number of elements in the array that the function returns correspond to the number of matches that the function finds.
For example, if the function finds 5 matches, then it will use a redim statement to resize the array to 5 elements and then fill in each element with information relating to the match.
If the function does not find any matches, what are some ways it can notify the function's caller that no matches are found? If the return value of the function is an integer, then I would just return a 0. This will let the caller know that 0 matches are found. In this case, the return value is an array which makes thing a little weird.
Thanks,
Bookmarks