|For love nor money I cannot get the syntax right.
I want to return 3 x 2D arrays from a function but can't wrap my head around it - I suspect I have just failed to grasp some fundamental aspect of jagged arrays!
Public Function SVD() As Double(,)(,)(,)
Dim arS(,) As Double
Dim arU(,) As Double
Dim arV(,) As Double
...Fill the Arrays...
Dim arSVD(,)(,)(,) As Double
arSVD(0) = arS
arSVD(1) = arU
arSVD(2) = arV
If I have it that way the error is on arSVD(n) and says 'Number of indices is less than the number of dimensions...'
If I change the return type and arSVD to Double()()() then the error is on the last arS and says 'Value of type 2D array cannot be converted to 1D array...'
If I change it to arSVD(0,0) for example the error is on the last arS and says 'Value of type 2D array cannot be converted to type 2D array of 2D array...'
Bash. Head. Brick. Wall.
Any help very gratefully received.