Hello, I need to pass an array to a sub. I have passed variables just fine but the array is giving errors. In the sub I have tried MyVar2, MyVar(), MyVar As String and not Array. I always get an error. I want to do something like:
B4X:
Dim MyVar(2,1) As String
MyVar(0,0)="Bill"
MyVar(0,1)="32"
MyVar(1,0)="Jimmy"
MyVar(1,1)="61"
MySub("ID Listing...", MyVar)
Sub MySub (Text as String, MyVar2 as Array)
For l=0 to MyVar2.Size
'show list
Loop
End Sub
Last edited: