Passing MultiDimensional Array as a paramenters in Functions
-
Hey: I want to pass two dimensional array in my function and return one dimensional array. My function will take two parameters: 1. two dimensional array 2. Row number. Once I call this function, it should return me one dimensional array i.e the row. For example,
Dim data(2,2) as Double Dim row as integer Dim tempRow(2) as Double row=0 tempRow=returnRow(data,row)
When I called this function, it should return me the first row since row is 0 Can you please me how to pass the multidimensional array and return one-dimensional array back. hsprasain -
Hey: I want to pass two dimensional array in my function and return one dimensional array. My function will take two parameters: 1. two dimensional array 2. Row number. Once I call this function, it should return me one dimensional array i.e the row. For example,
Dim data(2,2) as Double Dim row as integer Dim tempRow(2) as Double row=0 tempRow=returnRow(data,row)
When I called this function, it should return me the first row since row is 0 Can you please me how to pass the multidimensional array and return one-dimensional array back. hsprasainYou can accept a multidimensional array like this.
Private Function GetRow(ByVal data(,) As Double, ByVal row As Integer) As Double() End Function
The function also returns a 1-dimensnial array. All the function needs now is to get the values from the array and return them as 1-dimensional array.
-
You can accept a multidimensional array like this.
Private Function GetRow(ByVal data(,) As Double, ByVal row As Integer) As Double() End Function
The function also returns a 1-dimensnial array. All the function needs now is to get the values from the array and return them as 1-dimensional array.