Let's say I have this array:

Type MyType
        A As String
        B As Long
End Type

Sub Main
        Dim MyArray(0) As MyType, i As Long

'       A lot of stuff going on

        For i=1 To Something
                ReDim Preserve
        Next i

'       More stuff going on for quite a while
End Sub

So I have a big array of my own type. Now I want a function to do
things based on the contents of MyArray. I know I can do this:

Function MyFunction(AnArray As Variant)
'       Do things
End Function

So my question is, if I don't want to use the parameter-as-variant
method, is there another way?
I guess I could do something like the following:

Function MyFunction(AnArray(Something) As MyType)
'       Do things
End Function

The problem is that ”Something” is just that, something, not a known value.
Using the variant trick seems to be cheating to me… Is it the only way
to go, really?

Kind regards

Johnny Rosenberg
To unsubscribe send email to dev-unsubscr...@api.openoffice.org
For additional commands send email to sy...@api.openoffice.org
with Subject: help

Reply via email to