[Gambas-user] Calling Function for Array List Forms

Jussi Lahtinen jussi.lahtinen at gmail.com
Wed May 12 19:25:47 CEST 2021


> I do not understand what you mean.
>
> I just ask how i can call >> A Function << for all array items.
>
>
>
> If i do this:
>
> Dim ExampleArray As Form[] = [“form1”, “form2”, “form3”]
>
>
>
> I want works this:
>
> AnFunction(form1)
>
> AnFunction(form2)
>
> AnFunction(form3)
>
>
>
> This not works:
>
> AnFunction(ExampleArray[])
>

If your function iterates the array then:
AnFunction(ExampleArray)

If not then you need to iterate them for every call:
For ii = 0 To ExampleArray.Max
AnFunction(ExampleArray[ii])
Next


Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210512/158653ed/attachment.htm>


More information about the User mailing list