WilliamUT seems to be on the right track, but I can't get it to work for some reason.
In Vbscript, to return a value from a function call, you assign the function name a value WITHIN the function, and that's what gets returned. So, in WilliamUt's example, "Test = MyArray" would presumeably return whatever was in MyArray so you can use it once the function ends.
So, how do I know it worked? If I try to refer to any of the elements of the array outside of the of the Test() function like:
first_element = Test(0)
...how does it know the difference between referring to the first element of the Test array and trying to pass the value of Zero into the function? I'm assuming that's why WilliamUT declared the function "as array", but when I do that all I get is:
function the_function(test) as Array
----------------------------^
(the arrow is supposed to line up with the "a" in "as"
Any takers?