Any tips on returning an array from a function if i have no idea how many elements will be in it.
My questions are:
1) what type does my function return? (note first question marks)
2) what is the syntax of my 'Return' statement? (note second question marks)
3) how do i declare my variable from the caller (note third question marks)
4) how do i actually set my variable equal to my function (note fourth question marks)
I am sorry for the elementary nature of the question, however i am having one heck of a time.
Thanks
For Example:
Function ReturnArray() as ???
dim arrTest(5) as string
arrTest(0) = "Blah"
arrTest(1) = "Blah"
arrTest(2) = "Blah"
arrTest(3) = "Blah"
arrTest(4) = "Blah"
arrTest(5) = "Blah"
Return arrTest() ???
End Function
dim test as ???
test??? = returnArray()
My questions are:
1) what type does my function return? (note first question marks)
2) what is the syntax of my 'Return' statement? (note second question marks)
3) how do i declare my variable from the caller (note third question marks)
4) how do i actually set my variable equal to my function (note fourth question marks)
I am sorry for the elementary nature of the question, however i am having one heck of a time.
Thanks
For Example:
Function ReturnArray() as ???
dim arrTest(5) as string
arrTest(0) = "Blah"
arrTest(1) = "Blah"
arrTest(2) = "Blah"
arrTest(3) = "Blah"
arrTest(4) = "Blah"
arrTest(5) = "Blah"
Return arrTest() ???
End Function
dim test as ???
test??? = returnArray()