|
|
|||||||
Sorry, this may be a dumb question but my mind just can't seem to find the answer this morning. I want to use a UDF which returns an array. The size of the array will vary. How do I declare my variable to hold the returned array with the proper dimensions? If I declare it with length 0, will the function call automatically redim it with the returned array size? |
||||||||
|
|
|||||||
Brad, morning .. can't you just assing the array the function returns to a before declared variable (of type variant) ? Or do I miss something pretty obvious? |
||||||||
|
|
|||||||
Like: Code: DIM $myArray[] $myArray=SomeFunction() I think my problem was I thought I had to declare some length, but after your post went back and looked at the manual and it shows a declaration with no length. |
||||||||
|
|
|||||||
not even needed imo.. this should work as well: Code: DIM $myArray $myArray=SomeFunction() for each $e in $myArray $e ? next |
||||||||
|
|
|||||||
Ahh! OK. Thanks much! |