
How to declare function to return multidimensional array
Sure:
Public Function PassTheBucks(Whatever as Whatever)as Object
Let's say we have 19 items
Dim MyArray(20)
Fill the Array
MyArray(0) = "Hello"
Send it on its merry way
MyFunction = MyArray
End Funtion
hth
Quote:
> Could you give me a simple example or a pointer to an example?
> Thanks.
> Art
> > Pass it as an object instead.
> > Can't pass strings, as you're finding out, in the world of wwww.
> Everything
> > is defined as variant.
> > > I'm writing a web service function in which I'd like to return a
> > > multidimensional array. Single dimension arrays are easy:
> > > <WebMethod()>Public Function ArrayTest() As String()
> > > dim b(2) as String
> > > b(0)="abc"
> > > b(1)="def"
> > > return b
> > > End Function
> > > But I can't figure out the declaration syntax to return a
> multidimensional
> > > array. I've been everywhere in the books and on the web but this is
> > nowhere
> > > to be seen. I've tried all sorts of variations. Most won't compile.
> Those
> > > that do return errors at runtime.
> > > Thanks.
> > > Art