I want to return a list from a sub and I'm getting the error "Array Expected"
Update: Figured the answer - no brackets needed in Mylist = GetList()
So GetList returns a list, and in Test that list is assigned to MyList.
What should the code really be?
Update: Figured the answer - no brackets needed in Mylist = GetList()
B4X:
Sub Test
Dim MyList As List
MyList = GetList()
End Sub
Sub GetList() As List
Dim x As List
x.Initialize
Return x
End Sub
So GetList returns a list, and in Test that list is assigned to MyList.
What should the code really be?
Last edited: