im having an issue with a program im working on. what im trying to do is have a function accept input from a user and store that data in an array for small testing purposes it is a 3 x 3 array i have gotten the array within the function to work as tested by echoing out all values stored. however when i attempt to return the array to the sub from which it is called i get mismatch errors, im not sure what i am doing wrong.
Sub SubroutineA()
Dim Array(2,2)
Array = GetInfo()
End Sub
Function GetInfo()
Dim FunctionArray(2,2)
{input all data into array}
GetInfo = FunctionArray()
End Function
Any Help i could get would be great as this is new to me.
Cheran Shunmugavel points to the right direction, but his explanation contains an ambiguety. To make it clear:
Sub SubroutineA()
Dim Arr ' <<<--- do not use parenthesis here and do not use
' the reserved keyword "Array"
Arr = GetInfo()
End Sub
Function GetInfo()
Dim FunctionArray(2,2)
' {input all data into array}
GetInfo = FunctionArray ' <<<--- do not use parenthesis here
End Function
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With